Skip to content

Commit d2f183b

Browse files
committed
add auto merge
1 parent 52149d9 commit d2f183b

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

src/.github/dependabot.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ updates:
55
directory: "/"
66
schedule:
77
interval: "weekly"
8+
labels:
9+
- automerge
810
- package-ecosystem: "github-actions"
911
directory: "/"
1012
schedule:
1113
interval: "weekly"
14+
labels:
15+
- automerge
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Automerge
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, labeled, reopened]
6+
7+
jobs:
8+
automerge:
9+
if: contains(github.event.pull_request.labels.*.name, 'automerge')
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Merge PR
13+
run: |
14+
gh pr merge --auto --squash --body="[ci skip]" "$PR_URL"
15+
gh pr review --approve "$PR_URL"
16+
env:
17+
PR_URL: ${{ github.event.pull_request.html_url }}
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)