-
Notifications
You must be signed in to change notification settings - Fork 43
30 lines (28 loc) · 1 KB
/
auto-merge.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: Auto Merge Bot
on:
# GitHub considers PRs as issues
issue_comment:
types: [created]
jobs:
set-auto-merge:
runs-on: ubuntu-latest
timeout-minutes: 10
# Important! This forces the job to run only on comments on Pull Requests that starts with '/merge'
if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '/merge') }}
steps:
- name: Get the GitHub handle of the fellows
uses: paritytech/[email protected]
id: fellows
- name: Generate a token
id: merge_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.MERGE_APP_ID }}
private-key: ${{ secrets.MERGE_APP_KEY }}
owner: ${{ github.repository_owner }}
- name: Set auto merge
uses: paritytech/[email protected]
with:
GITHUB_TOKEN: ${{ steps.merge_token.outputs.token }}
MERGE_METHOD: "SQUASH"
ALLOWLIST: ${{ steps.fellows.outputs.github-handles }}