Skip to content

Commit bab16c6

Browse files
Create workflow to automatically enable auto-merge on PRs
Signed-off-by: Matty Widdop <18513864+MattyTheHacker@users.noreply.github.com>
1 parent b04ac77 commit bab16c6

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:
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.GITHUB_TOKEN }}
23+
PR_URL: ${{ github.event.pull_request.html_url }}

0 commit comments

Comments
 (0)