-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
31 lines (28 loc) · 1.04 KB
/
label-last-commenter.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
name: 'Tag issues with last commenter'
on:
issue_comment:
types: [created]
jobs:
toggle_labels:
name: Toggle Labels
runs-on: ubuntu-latest
if: ${{ !github.event.issue.pull_request }}
steps:
- name: Add label if commenter is not member
# Note: We only add the label if the issue is still open
if: |
github.event.comment.author_association != 'COLLABORATOR'
&& github.event.comment.author_association != 'MEMBER'
&& github.event.comment.author_association != 'OWNER'
&& github.event.issue.state == 'open'
uses: actions-ecosystem/action-add-labels@v1
with:
labels: 'Waiting for: Team'
- name: Remove label if commenter is member
if: |
github.event.comment.author_association == 'COLLABORATOR'
|| github.event.comment.author_association == 'MEMBER'
|| github.event.comment.author_association == 'OWNER'
uses: actions-ecosystem/action-remove-labels@v1
with:
labels: 'Waiting for: Team'