Check stale pull requests #758
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check stale pull requests | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 12 * * *' | |
permissions: | |
pull-requests: write | |
env: | |
# NOTE: We set the parameters below to -1, so issues will never be marked as stale or closed automatically. | |
BEFORE_ISSUE_STALE: -1 | |
BEFORE_ISSUE_CLOSE: -1 | |
BEFORE_PR_STALE: 14 | |
BEFORE_PR_CLOSE: 7 | |
jobs: | |
stale: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/stale@v6 | |
with: | |
debug-only: false | |
days-before-issue-stale: ${{ env.BEFORE_ISSUE_STALE }} | |
days-before-issue-close: ${{ env.BEFORE_ISSUE_CLOSE }} | |
ascending: true | |
stale-pr-message: | | |
This pull request is stale because it has been open for ${{ env.BEFORE_PR_STALE }} days with no activity. | |
It will be closed in ${{ env.BEFORE_PR_CLOSE }} days unless the `stale` label is removed. | |
close-pr-message: | | |
This pull request was closed due to a lack of activity for ${{ env.BEFORE_PR_CLOSE }} days after it was stale. | |
stale-pr-label: stale | |
close-pr-label: closed-due-inactivity | |
days-before-pr-stale: ${{ env.BEFORE_PR_STALE }} | |
days-before-pr-close: ${{ env.BEFORE_PR_CLOSE }} | |
exempt-pr-labels: 'external contribution :star:,roadmap,epic' | |
exempt-draft-pr: false | |
exempt-all-milestones: true | |
remove-stale-when-updated: true | |
operations-per-run: 256 |