Skip to content

Commit 5b037d1

Browse files
committed
Automatically close stale issues and PRs (nginx#948)
Adds a workflow to manage stale issues/PRs automatically. An issue/PR is marked as stale after 90 days of inactivity and closed 10 days after that if no action is taken.
1 parent 0955153 commit 5b037d1

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/stale.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: "Close stale issues and PRs"
2+
on:
3+
schedule:
4+
- cron: "30 2 * * *" # run every day at 02:30 UTC
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
stale:
11+
permissions:
12+
issues: write # for actions/stale to close stale issues
13+
pull-requests: write # for actions/stale to close stale PRs
14+
runs-on: ubuntu-22.04
15+
steps:
16+
- uses: actions/stale@1160a2240286f5da8ec72b1c0816ce2481aabf84 # v8.0.0
17+
with:
18+
repo-token: ${{ secrets.GITHUB_TOKEN }}
19+
stale-issue-message: "This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 10 days."
20+
stale-pr-message: "This PR is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 10 days."
21+
close-issue-message: "This issue was closed because it has been stalled for 10 days with no activity."
22+
close-pr-message: "This PR was closed because it has been stalled for 10 days with no activity."
23+
stale-issue-label: "stale"
24+
stale-pr-label: "stale"
25+
exempt-all-assignees: true
26+
exempt-all-milestones: true
27+
exempt-issue-labels: "backlog, backlog candidate"
28+
exempt-pr-labels: "backlog, backlog candidate"
29+
operations-per-run: 100
30+
days-before-stale: 90
31+
days-before-close: 10

0 commit comments

Comments
 (0)