2021-12-16 20:19:11 +01:00
name : Mark stale issues
on :
schedule :
2022-07-03 14:37:47 +02:00
- cron : '0 8 * * *'
2022-01-08 10:42:35 +01:00
workflow_dispatch :
2023-04-15 10:28:39 +02:00
issue_comment :
2021-12-16 20:19:11 +01:00
2023-04-17 20:52:51 +02:00
env :
stale_label : stale
2021-12-16 20:19:11 +01:00
jobs :
2023-04-16 14:39:13 +02:00
stale_action :
if : github.event_name != 'issue_comment'
2021-12-16 20:19:11 +01:00
runs-on : ubuntu-latest
permissions :
issues : write
steps :
2023-03-25 11:56:35 +01:00
- uses : actions/stale@v8.0.0
2022-07-07 20:05:27 +02:00
with :
repo-token : ${{ secrets.GITHUB_TOKEN }}
days-before-stale : 30
days-before-close : 5
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.'
2023-04-17 20:52:51 +02:00
stale-issue-label : $stale_label
2022-07-07 20:05:27 +02:00
exempt-issue-labels: 'Internal, Fixed in next release, Bug : Confirmed, Documentation Needed'
exempt-all-issue-assignees : true
operations-per-run : 300
close-issue-reason : 'not_planned'
2023-04-16 14:39:13 +02:00
remove_stale : # trigger "stale" removal immediately when stale issues are commented on
if : github.event_name == 'issue_comment'
permissions :
contents : read # for actions/checkout
issues : write # to edit issues label
runs-on : ubuntu-latest
steps :
- name : Checkout
2023-04-22 15:37:35 +02:00
uses : actions/checkout@v3.5.2
2023-04-16 14:39:13 +02:00
- name : Remove 'stale' label
2023-04-17 20:52:51 +02:00
run : gh issue edit ${{ github.event.issue.number }} --remove-label $stale_label
2023-04-16 14:39:13 +02:00
env :
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}