2021-12-16 19:19:11 +00:00
name : Mark stale issues
on :
schedule :
2022-07-03 12:37:47 +00:00
- cron : '0 8 * * *'
2022-01-08 09:42:35 +00:00
workflow_dispatch :
2023-04-15 08:28:39 +00:00
issue_comment :
2021-12-16 19:19:11 +00:00
2023-04-17 18:52:51 +00:00
env :
stale_label : stale
2021-12-16 19:19:11 +00:00
jobs :
2023-04-16 12:39:13 +00:00
stale_action :
if : github.event_name != 'issue_comment'
2021-12-16 19:19:11 +00:00
runs-on : ubuntu-latest
permissions :
issues : write
steps :
2023-12-09 10:36:49 +00:00
- uses : actions/stale@v9.0.0
2022-07-07 18:05:27 +00: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-05-31 20:14:05 +00:00
stale-issue-label : '${{ env.stale_label }}'
2022-07-07 18:05:27 +00: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 12:39:13 +00:00
2023-05-29 20:02:38 +00:00
remove_stale :
# trigger "stale" removal immediately when stale issues are commented on
# we need to explicitly check that the trigger does not run on comment on a PR as
2023-07-12 20:31:19 +00:00
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issue_comment-on-issues-only-or-pull-requests-only
if : ${{ !github.event.issue.pull_request && github.event_name != 'schedule' }}
2023-04-16 12:39:13 +00:00
permissions :
contents : read # for actions/checkout
issues : write # to edit issues label
runs-on : ubuntu-latest
steps :
- name : Checkout
2024-05-18 10:56:18 +00:00
uses : actions/checkout@v4.1.6
2023-04-16 12:39:13 +00:00
- name : Remove 'stale' label
2023-05-31 20:14:05 +00:00
run : gh issue edit ${{ github.event.issue.number }} --remove-label ${{ env.stale_label }}
2023-04-16 12:39:13 +00:00
env :
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}