Skip to content

Commit e276736

Browse files
r0qscameelekpyron
committed
Add workflow to label, comment and close stale pull requests
Co-authored-by: Kamil Śliwak <[email protected]> Co-authored-by: Daniel Kirchner <[email protected]>
1 parent 37597f9 commit e276736

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Check stale pull requests
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 12 * * *'
7+
8+
permissions:
9+
issues: read
10+
pull-requests: write
11+
12+
env:
13+
BEFORE_STALE: 14
14+
BEFORE_CLOSE: 7
15+
16+
jobs:
17+
stale:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/stale@v5
21+
with:
22+
debug-only: true
23+
# disable issues
24+
days-before-issue-stale: -1
25+
days-before-issue-close: -1
26+
stale-pr-message: |
27+
This pull request is stale because it has been open for ${{ env.BEFORE_STALE }} days with no activity.
28+
It will be closed in ${{ env.BEFORE_CLOSE }} days unless the `stale` label is removed.
29+
close-pr-message: |
30+
This pull request was closed due to a lack of activity for ${{ env.BEFORE_CLOSE }} days after it was stale.
31+
stale-pr-label: stale
32+
close-pr-label: closed-due-inactivity
33+
days-before-pr-stale: ${{ env.BEFORE_STALE }}
34+
days-before-pr-close: ${{ env.BEFORE_CLOSE }}
35+
exempt-pr-labels: 'external contribution'
36+
exempt-draft-pr: true
37+
exempt-all-milestones: true
38+
remove-stale-when-updated: true
39+
operations-per-run: 60

0 commit comments

Comments
 (0)