-
Notifications
You must be signed in to change notification settings - Fork 599
56 lines (51 loc) · 1.55 KB
/
command_retest.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
46
47
48
49
50
51
52
53
54
55
56
on: issue_comment
name: Issue Comments - retest
env:
OPP_PRODUCTION_TYPE: "k8s"
jobs:
handle_comments:
name: Check comments for /retest
if: |
startsWith(github.event.comment.body, '/retest')
runs-on: ubuntu-latest
steps:
- name: Restest command handler
id: command
uses: xt0rted/slash-command-action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
command: retest
reaction: "true"
reaction-type: "eyes"
allow-edits: "true"
permission-level: read
- name: Doing hold
uses: actions/github-script@v6
if: |
steps.command.outputs.command-name == 'retest'
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '/hold'
})
- name: Sleep for 10 seconds
uses: jakejarvis/wait-action@master
with:
time: '10s'
- name: Doing hold cancel
uses: actions/github-script@v6
if: |
steps.command.outputs.command-name == 'retest'
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '/hold cancel'
})