Skip to content

Commit d6024fa

Browse files
Create pr-auto-merge.yml
Signed-off-by: Matty Widdop <[email protected]>
1 parent 4a50ceb commit d6024fa

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: "Automatically enable auto-merge on PRs"
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- ready_for_review
8+
branches:
9+
- main
10+
11+
jobs:
12+
enable-automerge:
13+
if: github.event.pull_request.draft == false
14+
permissions:
15+
pull-requests: write
16+
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Enable auto-merge for the PR
20+
run: gh pr merge "$PR_URL" --auto --squash
21+
env:
22+
GH_TOKEN: ${{ secrets.PR_AUTO_UPDATE_TOKEN }}
23+
PR_URL: ${{ github.event.pull_request.html_url }}

0 commit comments

Comments
 (0)