Add issue handler workflow
- Handle triage for new issues - Handle backport issues
This commit is contained in:
40
.github/workflows/issue-handler.yml
vendored
Normal file
40
.github/workflows/issue-handler.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
name: Issue Handler
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
issues:
|
||||
types: [opened, labeled, unlabeled]
|
||||
|
||||
jobs:
|
||||
labeler:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Handle Issues
|
||||
uses: jvalkeal/issue-handler@v0.0.6
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
config: >
|
||||
{
|
||||
"data": {
|
||||
"team": ["jvalkeal"]
|
||||
},
|
||||
"recipes": [
|
||||
{
|
||||
"name": "Mark new issue to get triaged",
|
||||
"type": "ifThen",
|
||||
"if": "isAction('opened') && !dataInArray('team', actor)",
|
||||
"then": "labelIssue(['status/need-triage'])"
|
||||
},
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user