forked from longhorn/longhorn
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (36 loc) · 1.17 KB
/
wont-fix.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
name: Add-Wontfix-Label-To-Not-Planned-Issue
on:
issues:
types: [closed]
jobs:
add-wontfix-label:
runs-on: ubuntu-latest
steps:
- name: Check if the issue was closed with reason "not planned"
id: check-closed-reason
uses: actions/github-script@v6
with:
script: |
if (context.payload.issue.state_reason === "not_planned") {
return true;
}
return false;
- name: Add wontfix label
if: steps.check-closed-reason.outputs.result == 'true'
uses: actions-ecosystem/action-add-labels@v1
with:
labels: wontfix
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Clear milestone
if: steps.check-closed-reason.outputs.result == 'true'
uses: actions/github-script@v6
with:
script: |
const issue_number = context.payload.issue.number;
await github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
milestone: null
});
github_token: ${{ secrets.GITHUB_TOKEN }}