diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 00000000..07b58a2b --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,45 @@ +name: Stale Issue/PR Cleanup + +on: + schedule: + - cron: "30 1 * * *" + workflow_dispatch: + +permissions: + issues: write + pull-requests: write + +jobs: + stale: + name: Mark stale issues and pull requests + runs-on: ubuntu-latest + + steps: + - name: Run stale action + uses: actions/stale@v9 + with: + stale-issue-label: stale + stale-pr-label: stale + + days-before-issue-stale: 60 + days-before-issue-close: 14 + days-before-pr-stale: 30 + days-before-pr-close: -1 + + exempt-issue-labels: pinned,security + exempt-pr-labels: pinned,security + + remove-stale-when-updated: true + + stale-issue-message: > + This issue has been automatically marked as stale because it has not + had recent activity for 60 days. It will be closed in 14 days if no + further activity occurs. To keep it open, please comment or remove + the stale label. + stale-pr-message: > + This pull request has been automatically marked as stale because it + has not had recent activity for 30 days. To keep it active, please + comment or remove the stale label. + close-issue-message: > + This issue was closed because it remained stale for 14 days with no + further activity.