Skip to content
This repository was archived by the owner on Sep 19, 2026. It is now read-only.

Commit 261d98e

Browse files
committed
chore(ci): auto-merge Dependabot patch/minor PRs
1 parent c49787a commit 261d98e

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Dependabot auto-merge
2+
3+
on: pull_request_target
4+
5+
permissions:
6+
contents: write
7+
pull-requests: write
8+
9+
jobs:
10+
auto-merge:
11+
if: github.event.pull_request.user.login == 'dependabot[bot]'
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Fetch Dependabot metadata
15+
id: meta
16+
uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0
17+
18+
- name: Approve and enable auto-merge (patch/minor only)
19+
if: steps.meta.outputs.update-type != 'version-update:semver-major'
20+
run: |
21+
gh pr review --approve "$PR_URL"
22+
gh pr merge --auto --squash "$PR_URL"
23+
env:
24+
PR_URL: ${{ github.event.pull_request.html_url }}
25+
# PAT owned by a code owner (@bagelbits) — approves as you to satisfy
26+
# the code-owner review gate. GITHUB_TOKEN and App tokens cannot.
27+
GH_TOKEN: ${{ secrets.DEPENDABOT_AUTOMERGE_TOKEN }}

0 commit comments

Comments
 (0)