-
Notifications
You must be signed in to change notification settings - Fork 21
32 lines (31 loc) · 1021 Bytes
/
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
name: "Automerge"
on:
pull_request_target:
types:
- labeled
- unlabeled
- synchronize
- opened
- edited
- ready_for_review
- reopened
check_suite:
types:
- completed
workflow_dispatch: {}
jobs:
automerge:
runs-on: ubuntu-latest
steps:
- name: Enable auto-merge for automated chart bump PRs or label
id: automerge
if: |
(startsWith(github.head_ref, 'chartbump/') || contains(github.event.pull_request.labels.*.name, 'auto-merge'))
&& contains(github.event.pull_request.labels.*.name, 'ready-for-review')
&& !contains(github.event.pull_request.labels.*.name, 'do-not-merge')
&& !contains(github.event.pull_request.labels.*.name, 'do-not-merge/testing')
&& !contains(github.event.pull_request.labels.*.name, 'let-me-merge-it')
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}