-
Notifications
You must be signed in to change notification settings - Fork 11
48 lines (45 loc) · 1.73 KB
/
prow-commands.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
# Action by command-style comments (inspired by Kubernetes Prow)
name: "action by command-style comments"
# Event on a comment (in issue and PR)
on:
issue_comment:
types: [ created, edited ]
pull_request_review_comment:
types: [ created, edited ]
jobs:
execute:
# Execute when author_association of the comment is OWNER or MEMBER
if: ${{ github.event.comment.author_association == 'OWNER' || github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'COLLABORATOR' }}
# This job runs on Ubuntu-latest (Ubuntu 20.04 LTS checked on 2022-09-06)
# See https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
runs-on: ubuntu-latest
# Execute action according to commands
steps:
# Check author_association
- name: Check author_association
run: |
echo event.comment.user.login is ${{ github.event.comment.user.login }}
echo event.comment.author_association is ${{ github.event.comment.author_association }}
echo Hello, this workflow is allowed to OWNER, MEMBER, COLLABORATOR.
# Action according to command (by jpmcb/prow-github-actions)
- name: Action according to command
if: ${{ startsWith(github.event.comment.body, '/') }}
uses: jpmcb/[email protected]
with:
prow-commands: '/assign
/unassign
/approve
/retitle
/area
/kind
/priority
/remove
/lgtm
/close
/reopen
/lock
/milestone
/hold
/cc
/uncc'
github-token: "${{ secrets.GITHUB_TOKEN }}"