Skip to content

Commit 2178c98

Browse files
authored
Assign no-stale to Tasks/Epic/Opportunity issue type (home-assistant#163080)
1 parent ebedb18 commit 2178c98

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/restrict-task-creation.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,26 @@ on:
88
permissions: {}
99

1010
jobs:
11+
add-no-stale:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
issues: write
15+
if: >-
16+
github.event.issue.type.name == 'Task'
17+
|| github.event.issue.type.name == 'Epic'
18+
|| github.event.issue.type.name == 'Opportunity'
19+
steps:
20+
- name: Add no-stale label
21+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
22+
with:
23+
script: |
24+
await github.rest.issues.addLabels({
25+
owner: context.repo.owner,
26+
repo: context.repo.repo,
27+
issue_number: context.issue.number,
28+
labels: ['no-stale']
29+
});
30+
1131
check-authorization:
1232
runs-on: ubuntu-latest
1333
permissions:

0 commit comments

Comments
 (0)