-
Notifications
You must be signed in to change notification settings - Fork 106
47 lines (41 loc) · 1.4 KB
/
hold.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
name: Manage the hold label
on:
repository_dispatch:
types:
- hold-command
- unhold-command
jobs:
hold:
name: Add hold label
runs-on: ubuntu-latest
if: github.event.action == 'hold-command'
steps:
- name: Add the hold label to avoid merging
uses: actions-ecosystem/action-add-labels@v1
with:
github_token: "${{ secrets.CI_TOKEN }}"
number: ${{ github.event.client_payload.github.payload.issue.number }}
labels: hold
- name: Report status as reaction
uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ secrets.CI_TOKEN }}
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
reactions: hooray
unhold:
name: Remove the hold label
runs-on: ubuntu-latest
if: github.event.action == 'unhold-command'
steps:
- name: Remove the hold label to allow merging
uses: actions-ecosystem/action-remove-labels@v1
with:
github_token: "${{ secrets.CI_TOKEN }}"
number: ${{ github.event.client_payload.github.payload.issue.number }}
labels: hold
- name: Report status as reaction
uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ secrets.CI_TOKEN }}
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
reactions: hooray