Automation - Stale issues and PRs #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Automation - Stale issues and PRs' | |
on: | |
schedule: | |
- cron: '00 8 * * *' | |
env: | |
DAYS_BEFORE_STALE: 60 | |
DAYS_BEFORE_CLOSE: 7 | |
permissions: {} | |
jobs: | |
stale: | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write # required by stale-issue-label, stale-issue-message options and closing issues | |
pull-requests: write # required by stale-pr-label, stale-pr-message options and closing PRs | |
steps: | |
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0 | |
with: | |
# -= Timing =- | |
# Number of days of inactivity before an issue becomes stale | |
days-before-stale: ${{ env.DAYS_BEFORE_STALE }} | |
# Number of days of inactivity before a stale issue is closed | |
days-before-close: ${{ env.DAYS_BEFORE_CLOSE }} | |
# -= Labels and Exemptions =- | |
# Don't close issues with a milestone | |
exempt-all-milestones: true | |
# Issues with these labels will never be considered stale | |
# - Pinned issues should stick around | |
# - Security issues need to be resolved | |
exempt-issue-labels: 'pinned,security' | |
exempt-pr-labels: 'pinned,security' | |
# Label to use when marking an issue as stale | |
stale-issue-label: stale | |
stale-pr-label: stale | |
# -= Messages =- | |
# Comment to post when marking an issue as stale | |
stale-issue-message: > | |
Hi! This issue hasn't had any action for a while, so we're marking | |
it as stale. It will close in ${{ env.DAYS_BEFORE_CLOSE }} days | |
unless something changes. Thanks for helping keep our project tidy! | |
# Comment to post when closing a stale pull request | |
stale-pr-message: | | |
Hi! This pull request hasn't had any activity for a while, so we're | |
marking it as stale. It will close in ${{ env.DAYS_BEFORE_CLOSE }} | |
days unless something changes. Thanks for contributing! | |
# Disable messages when closing an issue/pull request | |
close-issue-message: false | |
close-pr-message: false |