We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 272cdb0 commit 6d177bcCopy full SHA for 6d177bc
.github/workflows/enable-auto-merge.yml
@@ -0,0 +1,28 @@
1
+name: Enable auto merge
2
+on:
3
+ pull_request_target:
4
+ types: [opened, ready_for_review]
5
+permissions:
6
+ contents: write
7
+jobs:
8
+ add_milestone:
9
+ runs-on: ubuntu-latest
10
+ if: ${{ github.event.pull_request.user.login == 'dependabot' && startsWith(github.event.pull_request.title, 'Bump ') }}
11
+ steps:
12
+ - name: Enable pull request auto-merge
13
+ env:
14
+ GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_PR_WRITE }}
15
+ PULL_REQUEST_ID: ${{ github.event.pull_request.node_id }}
16
+ run: |
17
+ gh api graphql -f query='
18
+ mutation($pull: ID!) {
19
+ enablePullRequestAutoMerge(input: {pullRequestId: $pull}) {
20
+ pullRequest {
21
+ id
22
+ number
23
+ autoMergeRequest {
24
+ mergeMethod
25
+ }
26
27
28
+ }' -f pull=$PULL_REQUEST_ID
0 commit comments