Close stale PR #685
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: Close stale PR | |
# This action will add a `stale` label and close immediately every PR that meets the following conditions: | |
# - it is already marked with "merge conflict" label | |
# - there was no update/comment on the PR in the last 30 days. | |
on: | |
schedule: | |
- cron: '0 10 * * *' | |
workflow_dispatch: | |
jobs: | |
stale: | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write | |
pull-requests: write | |
steps: | |
- uses: actions/[email protected] | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
# Do not automatically mark PR/issue as stale | |
days-before-stale: -1 | |
# Override 'days-before-stale' for PR only | |
days-before-pr-stale: 30 | |
# Close PRs immediately, after marking them 'stale' | |
days-before-pr-close: 0 | |
# only run the action on merge conflict PR | |
any-of-labels: 'Merge Conflict' | |
exempt-pr-labels: 'Internal, Never Stale, On Hold, WIP' | |
exempt-all-pr-assignees: true | |
operations-per-run: 300 | |
stale-pr-message: '' | |
close-pr-message: 'Existing merge conflicts have not been addressed. This PR is considered abandoned.' |