Skip to content

Close Stale Issues and PR #9688

Close Stale Issues and PR

Close Stale Issues and PR #9688

Workflow file for this run

name: "Close Stale Issues and PR"
on:
schedule:
- cron: "0 * * * *" # This runs every hour
workflow_dispatch:
permissions:
issues: write
pull-requests: write
env:
DAYS_BEFORE_ISSUE_STALE: 30
DAYS_BEFORE_ISSUE_CLOSE: 7
DAYS_BEFORE_PR_STALE: 5
DAYS_BEFORE_PR_CLOSE: 10
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
stale-issue-label: "state: inactive"
stale-pr-label: "state: inactive"
stale-issue-message: |
**Action required:** Issue inactive for ${{ env.DAYS_BEFORE_ISSUE_STALE }} days.
Status update or closure in ${{ env.DAYS_BEFORE_ISSUE_CLOSE }} days.
close-issue-message: |
Issue closed after ${{ env.DAYS_BEFORE_ISSUE_CLOSE }} days of inactivity.
stale-pr-message: |
**Action required:** PR inactive for ${{ env.DAYS_BEFORE_PR_STALE }} days.
Status update or closure in ${{ env.DAYS_BEFORE_PR_CLOSE }} days.
close-pr-message: |
PR closed after ${{ env.DAYS_BEFORE_PR_CLOSE }} days of inactivity.
days-before-issue-stale: ${{ env.DAYS_BEFORE_ISSUE_STALE }}
days-before-issue-close: ${{ env.DAYS_BEFORE_ISSUE_CLOSE }}
days-before-pr-stale: ${{ env.DAYS_BEFORE_PR_STALE }}
days-before-pr-close: ${{ env.DAYS_BEFORE_PR_CLOSE }}