Skip to content

Commit 6461a75

Browse files
committed
Add issue handler workflow
- Handle triage for new issues - Handle backport issues
1 parent f91b255 commit 6461a75

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/issue-handler.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Issue Handler
2+
3+
on:
4+
workflow_dispatch:
5+
issues:
6+
types: [opened, labeled, unlabeled]
7+
8+
jobs:
9+
labeler:
10+
runs-on: ubuntu-latest
11+
steps:
12+
13+
- name: Handle Issues
14+
uses: jvalkeal/[email protected]
15+
with:
16+
token: ${{ secrets.GITHUB_TOKEN }}
17+
config: >
18+
{
19+
"data": {
20+
"team": ["jvalkeal"]
21+
},
22+
"recipes": [
23+
{
24+
"name": "Mark new issue to get triaged",
25+
"type": "ifThen",
26+
"if": "isAction('opened') && !dataInArray('team', actor)",
27+
"then": "labelIssue(['status/need-triage'])"
28+
},
29+
{
30+
"name": "Manage backport issues",
31+
"type": "manageBackportIssues",
32+
"whenLabeled": "labeledStartsWith(['branch/'])",
33+
"whenUnlabeled": "labeledStartsWith(['branch/'])",
34+
"whenLabels": "labelsContainsAny(['for/backport'])",
35+
"fromLabels": "labeledStartsWith(['branch/'])",
36+
"additionalLabels": "'type/backport'",
37+
"body": "'Backport #' + number"
38+
}
39+
]
40+
}

0 commit comments

Comments
 (0)