-
Notifications
You must be signed in to change notification settings - Fork 89
67 lines (64 loc) · 2.27 KB
/
issue-handler.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Issue Handler
on:
workflow_dispatch:
issues:
types: [opened, labeled, unlabeled]
issue_comment:
types: [created]
jobs:
labeler:
runs-on: ubuntu-latest
steps:
- name: Handle Issues
uses: jvalkeal/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
config: >
{
"data": {
"team": [
"jvalkeal",
"oodamien",
"ilayaperumalg",
"sabbyanandan",
"tzolov",
"chrisjs",
"cppwfs",
"mminella",
"dturanski",
"onobc",
"claudiahub",
"sobychacko"
]
},
"recipes": [
{
"name": "Mark new issue to get triaged",
"type": "ifThen",
"if": "isAction('opened') && !dataInArray('team', actor)",
"then": "labelIssue(['status/need-triage'])"
},
{
"name": "Switch to team if user comments",
"type": "ifThen",
"if": "isEvent('issue_comment') && isAction('created') && actor == context.payload.issue.user.login && labelsContainsAny('status/need-feedback')",
"then": "[labelIssue('for/team-attention'), removeLabel('status/need-feedback')]"
},
{
"name": "Switch to user if team comments",
"type": "ifThen",
"if": "isEvent('issue_comment') && isAction('created') && dataInArray('team', actor) && labelsContainsAny('for/team-attention') ",
"then": "[labelIssue('status/need-feedback', removeLabel('for/team-attention'))]"
},
{
"name": "Manage backport issues",
"type": "manageBackportIssues",
"whenLabeled": "labeledStartsWith(['branch/'])",
"whenUnlabeled": "labeledStartsWith(['branch/'])",
"whenLabels": "labelsContainsAny(['for/backport'])",
"fromLabels": "labeledStartsWith(['branch/'])",
"additionalLabels": "'type/backport'",
"body": "'Backport #' + number"
}
]
}