Skip to content

Commit fb50bf3

Browse files
committed
chore(ci): auto-merge Dependabot patch-level bumps
Add a workflow that auto-merges Dependabot PRs classified as `version-update:semver-patch`. Minor and major updates still require human review — those are the ones that realistically carry breaking-change risk (Spring 4.x, Jedis 7.x, etc.). Merge is gated by `--auto`, which waits for the repo's required status checks (CI + CodeQL) to pass before completing. Without the branch protection recently added on main, this wouldn't be safe — a failing patch bump would merge immediately. Reduces the weekly Dependabot manual-merge grind without opening a hole for anything higher-risk than a point release.
1 parent 300a1c5 commit fb50bf3

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Dependabot auto-merge
2+
3+
on: pull_request
4+
5+
permissions:
6+
contents: write
7+
pull-requests: write
8+
9+
jobs:
10+
automerge:
11+
runs-on: ubuntu-latest
12+
if: github.event.pull_request.user.login == 'dependabot[bot]'
13+
steps:
14+
- name: Fetch Dependabot metadata
15+
id: meta
16+
uses: dependabot/fetch-metadata@v2
17+
18+
- name: Enable auto-merge for patch updates
19+
if: steps.meta.outputs.update-type == 'version-update:semver-patch'
20+
run: gh pr merge --auto --merge "$PR_URL"
21+
env:
22+
PR_URL: ${{ github.event.pull_request.html_url }}
23+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)