From ee81e3190e1262af215aa178531f4f2b5465b731 Mon Sep 17 00:00:00 2001 From: andrewthomaslee Date: Sun, 29 Nov 2026 10:23:04 -0600 Subject: [PATCH] Auto-merge Dependabot's minor and patch action bumps A workflow turns on squash auto-merge for Dependabot PRs unless the update is a semver major; the ruleset still requires ci / flake-check. Majors wait for the owner, since every org repo calls org-ci.yml@main. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/dependabot-auto-merge.yml | 25 +++++++++++++++++++++ documentation/docs/ci.md | 4 ++++ 2 files changed, 29 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..ddf7c89 --- /dev/null +++ b/.github/workflows/dependabot-auto-merge.yml @@ -0,0 +1,25 @@ +# Turns on squash auto-merge for Dependabot's minor and patch bumps of +# the actions org-ci.yml uses. The ruleset still gates the merge on +# "ci / flake-check". Major bumps wait for the owner: every org repo +# calls org-ci.yml@main, so a merged bump reaches all of them at once. +name: dependabot-auto-merge + +on: pull_request + +permissions: {} + +jobs: + auto-merge: + if: github.actor == 'dependabot[bot]' + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + steps: + - uses: dependabot/fetch-metadata@v3 + id: meta + - if: steps.meta.outputs.update-type != 'version-update:semver-major' + run: gh pr merge --auto --squash "$PR" + env: + PR: ${{ github.event.pull_request.html_url }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/documentation/docs/ci.md b/documentation/docs/ci.md index f8cc8dc..e2fb878 100644 --- a/documentation/docs/ci.md +++ b/documentation/docs/ci.md @@ -36,6 +36,10 @@ Callers pin `@main`: one maintainer, and every change to `org-ci.yml` lands through a PR whose own CI ran it. Dependabot (`.github/dependabot.yml`) keeps the actions it uses current, once, for every repo. +`dependabot-auto-merge.yml` turns on squash auto-merge for its minor and +patch bumps; they merge once `ci / flake-check` passes. Major bumps wait +for the owner. + ## Versioning The `release` job tags `..`: