From fcb3d48a1f7bd3e11db5d915e6c031dc5139fb68 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Wed, 15 Jan 2025 19:43:14 +0000 Subject: [PATCH] Auto merge test (#2706) # Description Please provide a summary of the changes, including relevant motivation and context. Closes #(issue_number) ## Checklist - [ ] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [ ] I have performed a self-review of my own code - [ ] I have attached images of the change if it is UI based - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] If my code has heavily changed functionality I have updated relevant docs on [Stirling-PDFs doc repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/) - [ ] My changes generate no new warnings - [ ] I have read the section [Add New Translation Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags) (for new translation tags only) --- .github/workflows/licenses-update.yml | 35 ++++++++++++--------------- build.gradle | 2 ++ 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/.github/workflows/licenses-update.yml b/.github/workflows/licenses-update.yml index 142938d4..98e81305 100644 --- a/.github/workflows/licenses-update.yml +++ b/.github/workflows/licenses-update.yml @@ -22,6 +22,13 @@ jobs: with: egress-policy: audit + - name: Generate GitHub App Token + id: generate-token + uses: actions/create-github-app-token@c1a285145b9d317df6ced56c09f525b5c2b6f755 # v1.11.1 + with: + app-id: ${{ vars.GH_APP_ID }} + private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} + - name: Check out code uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -42,8 +49,8 @@ jobs: - name: Set up git config run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "github-actions[bot]@users.noreply.github.com" + git config --global user.name "stirlingbot[bot]" + git config --global user.email "1113334+stirlingbot[bot]@users.noreply.github.com" - name: Run git add run: | @@ -55,32 +62,22 @@ jobs: if: env.CHANGES_DETECTED == 'true' uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6 with: - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ steps.generate-token.outputs.token }} commit-message: "Update 3rd Party Licenses" - committer: GitHub Action - author: GitHub Action + committer: "stirlingbot[bot] <1113334+stirlingbot[bot]@users.noreply.github.com>" + author: "stirlingbot[bot] <1113334+stirlingbot[bot]@users.noreply.github.com>" signoff: true branch: update-3rd-party-licenses title: "Update 3rd Party Licenses" body: | - Auto-generated by [create-pull-request][1] - - [1]: https://github.com/peter-evans/create-pull-request + Auto-generated by StirlingBot labels: licenses,github-actions draft: false delete-branch: true sign-commits: true - - name: Auto approve + - name: Enable Pull Request Automerge if: steps.cpr.outputs.pull-request-operation == 'created' - run: gh pr review --approve "${{ steps.cpr.outputs.pull-request-number }}" + run: gh pr merge --squash --auto "${{ steps.cpr.outputs.pull-request-number }}" env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Enable auto-merge - if: steps.cpr.outputs.pull-request-operation == 'created' - uses: peter-evans/enable-pull-request-automerge@a660677d5469627102a1c1e11409dd063606628d # v3.0.0 - with: - token: ${{ secrets.GITHUB_TOKEN }} - pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} - merge-method: squash # Choose the merge method: merge, squash, or rebase + GH_TOKEN: ${{ steps.generate-token.outputs.token }} diff --git a/build.gradle b/build.gradle index 86348adb..ed99b158 100644 --- a/build.gradle +++ b/build.gradle @@ -405,6 +405,8 @@ dependencies { implementation "com.bucket4j:bucket4j_jdk17-core:8.14.0" implementation "com.fathzer:javaluator:3.0.5" + implementation 'org.jsoup:jsoup:1.18.3' + developmentOnly("org.springframework.boot:spring-boot-devtools:$springBootVersion") compileOnly "org.projectlombok:lombok:$lombokVersion" annotationProcessor "org.projectlombok:lombok:$lombokVersion"