2022-12-30 20:46:36 +00:00
|
|
|
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
|
2023-01-06 22:00:55 +00:00
|
|
|
# - there was no update/comment on the PR in the last 30 days.
|
2022-12-30 20:46:36 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: '0 10 * * *'
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
stale:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
issues: write
|
|
|
|
pull-requests: write
|
|
|
|
|
|
|
|
steps:
|
2023-12-09 10:36:49 +00:00
|
|
|
- uses: actions/stale@v9.0.0
|
2022-12-30 20:46:36 +00:00
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2023-01-06 22:00:55 +00:00
|
|
|
# Do not automatically mark PR/issue as stale
|
2022-12-30 20:46:36 +00:00
|
|
|
days-before-stale: -1
|
2023-01-06 22:00:55 +00:00
|
|
|
# Override 'days-before-stale' for PR only
|
2022-12-30 20:46:36 +00:00
|
|
|
days-before-pr-stale: 30
|
2023-01-06 22:00:55 +00:00
|
|
|
# Close PRs immediately, after marking them 'stale'
|
2022-12-30 20:46:36 +00:00
|
|
|
days-before-pr-close: 0
|
|
|
|
# only run the action on merge conflict PR
|
|
|
|
any-of-labels: 'PR: 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.'
|