diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index 2ba5881010..0000000000 --- a/.github/stale.yml +++ /dev/null @@ -1,24 +0,0 @@ -# Number of days of inactivity before an issue becomes stale -daysUntilStale: 21 - -# Number of days of inactivity before a stale issue is closed -daysUntilClose: 14 - -# Issues with these labels will never be considered stale -exemptLabels: - - pinned - - security - - dependencies - -# Label to use when marking an issue as stale -staleLabel: stale - -# Comment to post when marking an issue as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. - -# Comment to post when closing a stale issue. Set to `false` to disable -closeComment: > - This issue is being closed automatically as it was stale diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000000..ff3802f26e --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,42 @@ +name: 'Close stale issues and PRs' +on: + schedule: + - cron: '0 19 * * *' # Run daily at 7pm GMT + workflow_dispatch: # Allow manual trigger + +permissions: + issues: write + pull-requests: write + contents: write # Required for delete-branch option + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v10 + with: + # Stale issues configuration + days-before-issue-stale: 90 + days-before-issue-close: 30 + stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Please comment if you believe this issue should remain open.' + stale-issue-label: 'stale' + close-issue-message: 'This issue has been automatically closed due to inactivity. Please feel free to reopen if needed.' + + # Stale PRs configuration + days-before-pr-stale: 90 + days-before-pr-close: 30 + stale-pr-message: 'This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs.' + stale-pr-label: 'stale' + close-pr-message: 'This pull request has been automatically closed due to inactivity. Please feel free to reopen if needed.' + + # Exemptions + # Note: Renovate PRs typically have the "dependencies" label which is also excluded + exempt-pr-labels: 'pinned,dependencies,keep_open' + exempt-all-pr-assignees: false + exempt-all-issue-assignees: false + + # Delete branch after closing stale PR + delete-branch: true + + # Operations per run + operations-per-run: 50 \ No newline at end of file