Skip to content

Commit 35f5d56

Browse files
committed
chore(ci): enable dependabot grouping and patch+minor auto-merge
Group npm + github-actions weekly PRs so they land as one-PR-per-group instead of one-per-package. Auto-merge workflow flips on --squash --auto for semver-patch + semver-minor; CI gating still applies, majors (Astro 6 etc.) stay manual.
1 parent 92d19bd commit 35f5d56

2 files changed

Lines changed: 55 additions & 0 deletions

File tree

.github/dependabot.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "npm"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
groups:
8+
runtime-deps:
9+
patterns:
10+
- "*"
11+
exclude-patterns:
12+
- "@types/*"
13+
- "eslint*"
14+
- "prettier*"
15+
- "vitest*"
16+
dev-deps:
17+
patterns:
18+
- "@types/*"
19+
- "eslint*"
20+
- "prettier*"
21+
- "vitest*"
22+
23+
- package-ecosystem: "github-actions"
24+
directory: "/"
25+
schedule:
26+
interval: "weekly"
27+
groups:
28+
github-actions:
29+
patterns:
30+
- "*"
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Dependabot Auto-Merge
2+
3+
on: pull_request
4+
5+
permissions:
6+
contents: write
7+
pull-requests: write
8+
9+
jobs:
10+
auto-merge:
11+
if: github.actor == 'dependabot[bot]'
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Fetch Dependabot metadata
15+
id: meta
16+
uses: dependabot/fetch-metadata@v2
17+
with:
18+
github-token: ${{ secrets.GITHUB_TOKEN }}
19+
20+
- name: Enable auto-merge for patch + minor bumps
21+
if: steps.meta.outputs.update-type == 'version-update:semver-patch' || steps.meta.outputs.update-type == 'version-update:semver-minor'
22+
run: gh pr merge --squash --auto "$PR_URL"
23+
env:
24+
PR_URL: ${{ github.event.pull_request.html_url }}
25+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)