Skip to content

Commit 66c0730

Browse files
committed
ci: mark and close PRs with formality issues
Add a recurring workflow that runs every day at 5:30 and marks all PRs that have formality check failures (i.e. marked as 'not following guidelines') that have not been active in the past 14 days as stale. Close stale PRs after 14 more days. Signed-off-by: George Sapkin <[email protected]>
1 parent bbaa539 commit 66c0730

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/stale-bot.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Mark and close stale issues and PRs
2+
3+
on:
4+
schedule:
5+
# Run once a day at 05:30
6+
- cron: '30 5 * * *'
7+
8+
permissions:
9+
actions: write
10+
pull-requests: write
11+
12+
jobs:
13+
stale:
14+
runs-on: ubuntu-slim
15+
steps:
16+
- name: Mark and close PRs with formality issues
17+
uses: actions/stale@v10
18+
with:
19+
repo-token: ${{ secrets.GITHUB_TOKEN }}
20+
stale-pr-message: |
21+
This PR is stale because it has been open for 14 days with no activity and has the "not following guidelines" label.
22+
It will be closed if no further activity occurs within 14 days.
23+
close-pr-message: 'This PR was closed because it has been marked stale for 14 days with no activity.'
24+
days-before-stale: 14
25+
days-before-close: 14
26+
only-labels: 'not following guidelines'
27+
stale-pr-label: 'stale'

0 commit comments

Comments
 (0)