diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 00000000..a37561cb --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,40 @@ +name: 'Close stale issues and PRs' + +on: + schedule: + # Run daily at 1:30 AM UTC + - cron: '30 1 * * *' + workflow_dispatch: # Allow manual trigger + +permissions: + issues: write + pull-requests: write + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + days-before-stale: 30 + days-before-close: 7 + + stale-issue-message: | + This issue is stale because it has been open 30 days with no activity. + Remove the stale label or comment or this will be closed in 7 days. + stale-pr-message: | + This PR is stale because it has been open 30 days with no activity. + Remove the stale label or comment or this will be closed in 7 days. + + close-issue-message: | + This issue was closed because it has been stalled for 7 days with no activity. + close-pr-message: | + This PR was closed because it has been stalled for 7 days with no activity. + + stale-issue-label: 'stale' + stale-pr-label: 'stale' + + exempt-issue-labels: 'pinned,security,enhancement' + exempt-pr-labels: 'pinned,security,work-in-progress,draft' + + operations-per-run: 100