forked from conda/constructor
-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (36 loc) · 1.44 KB
/
issues.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
name: Automate Issues
on:
# NOTE: github.event is issue_comment payload:
# https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#issue_comment
issue_comment:
types: [created]
env:
FEEDBACK_LBL: pending::feedback
SUPPORT_LBL: pending::support
jobs:
# NOTE: doesn't catch cases where multiple users act as the author/reporter,
# this is just an effort to catch the majority of support cases
# TODO: create conda-triaging team and modify this to toggle label based on
# whether a non-triaging engineer commented
pending_support:
# if [pending::feedback] and the author responds
if: >-
!github.event.repository.fork
&& github.event_name == 'issue_comment'
&& github.event.action == 'created'
&& !github.event.issue.pull_request
&& contains(github.event.issue.labels.*.name, 'pending::feedback')
&& github.event.issue.user.login == github.event.comment.user.login
runs-on: ubuntu-latest
steps:
# remove [pending::feedback]
- uses: actions-ecosystem/[email protected]
with:
labels: ${{ env.FEEDBACK_LBL }}
github_token: ${{ secrets.PROJECT_TOKEN }}
# add [pending::feedback], if still open
- uses: actions-ecosystem/[email protected]
if: github.event.issue.state == 'open'
with:
labels: ${{ env.SUPPORT_LBL }}
github_token: ${{ secrets.PROJECT_TOKEN }}