👷️ Update labeler workflow with new labels
This commit is contained in:
1 parent
d62b9f00de
commit
23b6bd1101
1 file changed
+17
-11
@@ -11,23 +11,29 @@ jobs:
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
let labels = [];
|
||||
let labels = []:
|
||||
context.issue.labels.forEach(label => { labels.push(label.name) });
|
||||
|
||||
if (context.payload.issue.title.match(/\[request\]|feature request/i)) {
|
||||
labels.push('type:request');
|
||||
labels.push('request');
|
||||
labels = labels.filter(label => label !== 'triage');
|
||||
}
|
||||
if (context.payload.issue.title.match(/\[brainstorming\]/i)) {
|
||||
labels.push('type:brainstorming');
|
||||
labels.push('brainstorming');
|
||||
labels = labels.filter(label => label !== 'triage');
|
||||
}
|
||||
if (context.payload.issue.title.match(/\[rc feedback\]/i)) {
|
||||
labels.push('type:rc feedback');
|
||||
labels.push('rc feedback');
|
||||
labels = labels.filter(label => label !== 'triage');
|
||||
}
|
||||
|
||||
if (labels.length > 0) {
|
||||
github.issues.addLabels({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
labels: labels
|
||||
})
|
||||
if (labels.length === 0) {
|
||||
labels.push('triage');
|
||||
}
|
||||
|
||||
github.issues.setLabels({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
labels: labels
|
||||
})
|
||||
Reference in new issue
Block a user