-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (37 loc) · 1.44 KB
/
pr__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
31
32
33
34
35
36
37
38
39
name: Auto merge bot
on:
pull_request_target:
types:
- labeled
- unlabeled
check_suite:
types:
- success
status: {}
jobs:
automerge:
runs-on: ubuntu-latest
steps:
- name: Labels status comment
if: github.event_name == 'pull_request_target'
uses: marocchino/sticky-pull-request-comment@v2
with:
GITHUB_TOKEN: '${{ secrets.BOT_PAT }}'
header: 'status'
recreate: true
message: |
✨PR Status ✨
| Condition | |
| ------------- | ------------- |
| Has Required Labels `approved, lgtm` | ${{ contains( github.event.pull_request.labels.*.name, 'approved') &&
contains( github.event.pull_request.labels.*.name, 'lgtm') && '✅' || '❌' }} |
| No Blocking Labels `wip, hold` | ${{ (contains( github.event.pull_request.labels.*.name, 'wip') ||
contains( github.event.pull_request.labels.*.name, 'hold')) && '❌' || '✅' }} |
_This Pull Request will not merge until all required tests have passed_
- name: Auto merge if labels ok # And required cheacks pass, enforced by user credentials
id: automerge
uses: 'pascalgn/automerge-action@v0.14.3'
env:
GITHUB_TOKEN: '${{ secrets.BOT_PAT }}' # User must not have admin credentials
MERGE_LABELS: 'approved,lgtm,!WIP,!hold'
MERGE_METHOD: squash