Skip to content

Close stale issues and PRs #2

Close stale issues and PRs

Close stale issues and PRs #2

# Close stale issues and pull requests (uses actions/stale@v4 with GITHUB_TOKEN)
on:
schedule:
- cron: "0 0 * * 1" # weekly run: every Monday at 00:00 UTC
workflow_dispatch:
permissions:
issues: write
pull-requests: write
name: Close stale issues and PRs
jobs:
stale:
runs-on: ubuntu-latest
steps:
- name: Run stale action
uses: actions/stale@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# Messages for issues (mention the issue author)
stale-issue-message: "Hey there, this issue has been automatically marked as stale because it has not had recent activity. It will be auto-closed after and additional 10 days of inactivity. If you need it open for longer, add the label `stale-exempt`."
close-issue-message: "Hey there, this issue has been automatically closed due to 45 days of inactivity. If needed, please reopen or comment and we can reevaluate your request."
# Messages for pull requests (mention the PR author)
stale-pr-message: "Hey there, this pull request has been automatically marked as stale because it has not had recent activity. It will be auto-closed after and additional 10 days of inactivity. If you need it open for longer, add the label `stale-exempt`."
close-pr-message: "Hey there, this pull request has been automatically closed due to 45 days of inactivity. If needed, please reopen or comment and we can reevaluate your request."
# Time thresholds (adjust to your policy)
days-before-stale: 35
days-before-close: 15
operations-per-run: 100
exempt-pr-labels: stale-exempt
exempt-issues-labels: stale-exempt