A script that closes abandoned Github issues after a period of inactivity. Behavior based on Probot Stale.
- Create
.github/stale.yml
based on the following template. - Install via
pip install git+https://github.com/treytabner/stale-issues.git
. - Run
stale-issues --help
to see command line options.
You must set the environment variable GITHUB_TOKEN
to a valid Github personal
access token. The repo format is username/repo
or organization/repo
.
# Number of days of inactivity before an Issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before an Issue with the stale label is closed.
# Set to false to disable. If disabled, issues still need to be closed manually,
# but will remain marked as stale.
daysUntilClose: 7
# Only Issues with all of these labels are check if stale. Defaults to `[]` (disabled)
onlyLabels: []
# Issues with these labels will never be considered stale. Set to `[]` to disable
exemptLabels:
- compliance
- security
# Set to true to ignore issues in a milestone (defaults to true)
exemptMilestones: true
# Set to true to ignore issues with an assignee (defaults to true)
exemptAssignees: true
# Label to use when marking as stale
staleLabel: stale
# Comment to post when marking as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not
had recent activity. It will be closed if no further activity occurs.
# Comment to post when removing the stale label.
# unmarkComment: >
# Your comment here.
# Comment to post when closing a stale Issue.
# closeComment: >
# Your comment here.
# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 30
ISC Copyright © 2022 Trey Tabner