Skip to content

Commit 7d10f6b

Browse files
committed
build: enable dependabot automerge
1 parent 9d4a58c commit 7d10f6b

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,14 @@ updates:
77
open-pull-requests-limit: 10
88
assignees:
99
- 0xERR0R
10+
labels:
11+
- "dependencies"
12+
- "go"
1013

1114
- package-ecosystem: github-actions
1215
directory: "/"
1316
schedule:
1417
interval: daily
18+
labels:
19+
- "dependencies"
20+
- "github-actions"
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Dependabot Auto-Merge
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
11+
jobs:
12+
auto-merge:
13+
name: Auto-merge Dependabot PRs
14+
runs-on: ubuntu-latest
15+
# Only run for Dependabot PRs
16+
if: github.actor == 'dependabot[bot]'
17+
18+
steps:
19+
- name: Get PR metadata
20+
id: metadata
21+
uses: dependabot/fetch-metadata@v2
22+
with:
23+
github-token: "${{ secrets.GITHUB_TOKEN }}"
24+
25+
- name: Auto-approve PR
26+
run: gh pr review --approve "$PR_URL"
27+
env:
28+
PR_URL: ${{ github.event.pull_request.html_url }}
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
31+
- name: Enable auto-merge
32+
run: gh pr merge --auto --squash "$PR_URL"
33+
env:
34+
PR_URL: ${{ github.event.pull_request.html_url }}
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)