-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (40 loc) · 1.65 KB
/
review-actions.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
41
42
43
44
45
name: "Review Actions"
on:
pull_request:
types: [ review_requested, review_request_removed ]
pull_request_review:
types: [ submitted ]
jobs:
prereview:
runs-on: ubuntu-latest
if: ${{ (github.event_name == 'pull_request') }}
steps:
- name: "Mark PR as wait for review"
if: ${{ (github.event.action == 'review_requested') }}
uses: andymckay/labeler@1.0.4
with:
add-labels: "status/wait-for-review"
remove-labels: "status/wip, status/do-not-merge, lifecycle/ready-for-merge"
- name: "Mark PR as work in progress"
if: ${{ (github.event.action == 'review_request_removed') }}
uses: andymckay/labeler@1.0.4
with:
add-labels: "status/wip"
remove-labels: "status/wait-for-review, status/do-not-merge, lifecycle/ready-for-merge"
postreview:
runs-on: ubuntu-latest
if: ${{ (github.event_name == 'pull_request_review') && (github.event.action == 'submitted') }}
steps:
- name: "Mark PR as ready for merge"
if: ${{ (github.event.review.state == 'approved') }}
uses: andymckay/labeler@1.0.4
with:
add-labels: "lifecycle/ready-for-merge"
remove-labels: "status/wip, status/wait-for-review, status/do-not-merge"
- name: "Mark PR as do not merge"
if: ${{ (github.event.review.state) == 'request_changes' }}
uses: andymckay/labeler@1.0.4
with:
add-labels: "status/do-not-merge"
remove-labels: "status/wip, status/wait-for-review, lifecycle/ready-for-merge"
# related labels: status/wip, status/wait-for-review, status/do-not-merge, lifecycle/ready-for-merge