-
-
Notifications
You must be signed in to change notification settings - Fork 233
40 lines (40 loc) · 1.03 KB
/
onpr_automerge.yaml
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
31
32
33
34
35
36
37
38
39
40
# yamllint disable rule:line-length
# shellcheck disable=SC2043
---
name: automerge
on:
pull_request_review:
types:
- submitted
issue_comment:
types: created
check_suite:
types:
- completed
status: {}
jobs:
labeler:
runs-on: ubuntu-latest
steps:
- name: Add the automerge label
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/automerge') }}
uses: actions/github-script@v4
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['automerge']
})
automerge:
runs-on: ubuntu-latest
needs: [labeler]
steps:
- id: automerge
if: ${{ github.event.issue.pull_request }}
name: automerge
uses: "pascalgn/[email protected]"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"