From 10ae76c5b607adfc1e617672f3f1519a0f19dbc2 Mon Sep 17 00:00:00 2001 From: Tony Le Date: Tue, 10 Nov 2026 17:17:29 -0600 Subject: [PATCH] ci: auto-merge Dependabot patch/minor updates after required checks pass Co-Authored-By: Claude Opus 5.5 --- .github/workflows/dependabot-auto-merge.yml | 35 +++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/dependabot-auto-merge.yml diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml new file mode 100644 index 0000000..ccc91ff --- /dev/null +++ b/.github/workflows/dependabot-auto-merge.yml @@ -0,0 +1,35 @@ +name: dependabot-auto-merge + +# Queue Dependabot patch and minor updates for auto-merge. GitHub merges them +# only after the branch's required checks pass. Major updates are left for a +# human to review. + +on: pull_request + +permissions: + contents: write + pull-requests: write + +jobs: + auto-merge: + if: github.event.pull_request.user.login == 'dependabot[bot]' + runs-on: ubuntu-latest + steps: + - id: meta + uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Enable auto-merge (patch and minor only) + if: steps.meta.outputs.update-type != 'version-update:semver-major' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_URL: ${{ github.event.pull_request.html_url }} + run: gh pr merge --auto --squash "$PR_URL" + + - name: Leave major updates for review + if: steps.meta.outputs.update-type == 'version-update:semver-major' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_URL: ${{ github.event.pull_request.html_url }} + run: gh pr comment "$PR_URL" --body "Major version update. Not auto-merged; please review the changelog."