From ae28cb5fbb4a89c1a9065e1dfb905191b12beecb Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Wed, 27 Nov 2024 21:28:58 +0100 Subject: [PATCH 1/2] refactor: updated auto-merge capability adapted out of https://github.com/db-ui/mono/blob/main/.github/workflows/99-auto-merge.yml --- .github/workflows/99-auto-merge.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/99-auto-merge.yml b/.github/workflows/99-auto-merge.yml index b2799def..5e34ea17 100644 --- a/.github/workflows/99-auto-merge.yml +++ b/.github/workflows/99-auto-merge.yml @@ -8,17 +8,20 @@ jobs: runs-on: ubuntu-latest if: ${{ github.actor == 'dependabot[bot]' }} steps: - - name: ⬇ Dependabot metadata + - name: ⏬ Dependabot metadata id: metadata uses: dependabot/fetch-metadata@v2 with: github-token: "${{ secrets.GITHUB_TOKEN }}" + - name: ✔ Approve a PR run: gh pr review --approve "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + - name: 🤖 Enable auto-merge for Dependabot PRs + if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}} run: gh pr merge --auto --squash "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} From daa966285864bf56c19a4ce38c30f7dc69cb041b Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Thu, 28 Nov 2024 09:58:24 +0100 Subject: [PATCH 2/2] Update 99-auto-merge.yml --- .github/workflows/99-auto-merge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/99-auto-merge.yml b/.github/workflows/99-auto-merge.yml index 5e34ea17..761b73d0 100644 --- a/.github/workflows/99-auto-merge.yml +++ b/.github/workflows/99-auto-merge.yml @@ -21,7 +21,7 @@ jobs: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - name: 🤖 Enable auto-merge for Dependabot PRs - if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}} + if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}} run: gh pr merge --auto --squash "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}}