Skip to content

Commit 67b3d0c

Browse files
authored
infra: autoclose stale PRs (#1177)
1 parent 3ada66e commit 67b3d0c

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/docs-cleanup.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,35 @@ jobs:
2424
permissions:
2525
pages: write
2626
contents: write
27+
pull-requests: write
2728
steps:
29+
- name: Close abandoned PRs
30+
uses: actions/stale@v9
31+
with:
32+
repo-token: ${{ secrets.GITHUB_TOKEN }}
33+
34+
# days-before-stale Idle number of days before marking issues/PRs stale (default: 60)
35+
# days-before-close Idle number of days before closing stale issues/PRs (default: 7)
36+
37+
# Don't handle issues
38+
# If set to a negative number like -1, the issues or the pull requests will never be closed automatically.
39+
days-before-issue-stale: -1 # Override days-before-stale for issues only
40+
days-before-issue-close: -1 # Override days-before-close for issues only
41+
42+
# Handle PRs
43+
# Mark as stale after 30 days of inactivity and then for stale PRs close after 10 days
44+
days-before-pr-stale: 30 # Override days-before-stale for PRs only
45+
days-before-pr-close: 10 # Override days-before-close for PRs only
46+
47+
# Add message to the PR when it is stale
48+
stale-pr-message: >
49+
This PR is stale because it has been open for 30 days with no activity. It will be closed in 10 days if no further activity occurs. #magic___^_^___line
50+
# Label the PR as autoclosed
51+
close-pr-label: autoclose
52+
53+
# Add comment to the PR when it is closed
54+
close-pr-message: "Auto-closing: no activity for 30 days. If this is still relevant, reopen or create a fresh PR."
55+
2856
- name: Checkout gh-pages branch
2957
uses: actions/checkout@v4
3058
with:

0 commit comments

Comments
 (0)