-
Notifications
You must be signed in to change notification settings - Fork 158
73 lines (67 loc) · 1.86 KB
/
dev-pr.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Dev PR
on:
pull_request_review:
types:
- submitted
pull_request_target:
types:
- opened
- reopened
- edited
- labeled
- unlabeled
- synchronize
- ready_for_review
- unlocked
branches:
- dev
- main
permissions:
actions: write
issues: write
pull-requests: write
jobs:
# printer:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# - name: Print
# run: echo '${{ github.event.pull_request.base.ref }}'
dev-pr:
if: github.base_ref == 'dev' && github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Ensure checklists are filled
uses: actions/github-script@v4
with:
script: |
const script = require('.github/actions/checklist.js').check;
await script({context});
- name: Ensure title update with changes type
uses: actions/github-script@v4
with:
script: |
const script = require('.github/actions/pr-title.js').update;
await script({ context, github });
- name: automerge
uses: pascalgn/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MERGE_LABELS: automerge
MERGE_METHOD: squash
MERGE_COMMIT_MESSAGE: pull-request-title
MERGE_REQUIRED_APPROVALS: 1
prod-pr:
if: github.base_ref == 'main' && github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: automerge
uses: pascalgn/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MERGE_LABELS: automerge
MERGE_METHOD: rebase
MERGE_COMMIT_MESSAGE: automatic
MERGE_REQUIRED_APPROVALS: 1