Skip to content

Commit 3c3d3c1

Browse files
committed
ci: group dependabot updates; auto-merge patch only
1 parent a3cf699 commit 3c3d3c1

2 files changed

Lines changed: 38 additions & 3 deletions

File tree

‎.github/dependabot.yml‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,19 @@ updates:
66
rebase-strategy: auto
77
schedule:
88
interval: "weekly"
9-
allow:
10-
- dependency-name: "*"
11-
dependency-type: "all"
129
commit-message:
1310
prefix: "chore(deps):"
1411
versioning-strategy: increase
12+
# Patch bumps grouped into one PR (auto-merged on green CI); minor bumps
13+
# grouped into a separate PR for manual review; majors open individually.
14+
groups:
15+
patch:
16+
patterns:
17+
- "*"
18+
update-types:
19+
- patch
20+
minor:
21+
patterns:
22+
- "*"
23+
update-types:
24+
- minor
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Dependabot auto-merge
2+
on: pull_request
3+
4+
permissions:
5+
contents: write
6+
pull-requests: write
7+
8+
jobs:
9+
auto-merge:
10+
if: ${{ github.actor == 'dependabot[bot]' }}
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Fetch update metadata
15+
id: meta
16+
uses: dependabot/fetch-metadata@v2
17+
18+
# Auto-merge patch updates once the required checks pass. Minor and major
19+
# updates are left for manual review (the `if` below excludes them).
20+
- name: Enable auto-merge for patch
21+
if: ${{ steps.meta.outputs.update-type == 'version-update:semver-patch' }}
22+
run: gh pr merge --auto --squash "$PR_URL"
23+
env:
24+
PR_URL: ${{ github.event.pull_request.html_url }}
25+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)