Skip to content

Commit d1152e5

Browse files
committed
Run stale removol as seperate job
Signed-off-by: Christian König <ckoenig@posteo.de>
1 parent 9a5aa67 commit d1152e5

File tree

1 file changed

+28
-13
lines changed

1 file changed

+28
-13
lines changed

.github/workflows/stale.yml

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,40 @@ name: Mark stale issues
22

33
on:
44
schedule:
5-
- cron: '0 * * * *'
5+
- cron: '0 8 * * *'
66
workflow_dispatch:
77
issue_comment:
88

99
jobs:
10-
stale:
11-
10+
stale_action:
11+
if: github.event_name != 'issue_comment'
1212
runs-on: ubuntu-latest
1313
permissions:
1414
issues: write
1515

1616
steps:
17-
- uses: actions/stale@v5
18-
with:
19-
repo-token: ${{ secrets.GITHUB_TOKEN }}
20-
days-before-stale: 0
21-
days-before-close: 5
22-
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days.'
23-
stale-issue-label: 'Submitter Attention Required'
24-
exempt-issue-labels: 'pinned, Fixed In Next Release, Bug'
25-
exempt-all-issue-assignees: true
26-
operations-per-run: 300
17+
- uses: actions/stale@v7.0.0
18+
with:
19+
repo-token: ${{ secrets.GITHUB_TOKEN }}
20+
days-before-stale: 30
21+
days-before-close: 5
22+
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days.'
23+
stale-issue-label: 'stale'
24+
exempt-issue-labels: 'Internal, Fixed in next release, Bug: Confirmed, Documentation Needed'
25+
exempt-all-issue-assignees: true
26+
operations-per-run: 300
27+
close-issue-reason: 'not_planned'
28+
29+
remove_stale: # trigger "stale" removal immediately when stale issues are commented on
30+
if: github.event_name == 'issue_comment'
31+
permissions:
32+
contents: read # for actions/checkout
33+
issues: write # to edit issues label
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v3.4.0
38+
- name: Remove 'stale' label
39+
run: gh issue edit ${{ github.event.issue.number }} --remove-label 'stale'
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)