Skip to content

Commit 039f613

Browse files
(ci) - Add stale config to close PRs and issues which are inactivity (#1989)
1 parent 71108b2 commit 039f613

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/stale.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# This workflow automatically marks issues and pull requests as stale after 90 days of inactivity
2+
# and closes them after an additional 30 days if no further activity occurs.
3+
#
4+
# Key behavior:
5+
# - After 90 days of no activity:
6+
# - Open issues and pull requests are labeled with "lifecycle/stale"
7+
# - A comment is posted to notify contributors about the inactivity
8+
#
9+
# - After 30 additional days (i.e., 120 days total):
10+
# - If still inactive and still labeled "lifecycle/stale", the issue or PR is closed
11+
# - A closing comment is posted to explain why it was closed
12+
#
13+
# - Activity such as a comment, commit, or label removal during the stale period
14+
# will remove the "lifecycle/stale" label and reset the clock
15+
#
16+
# - Items with any of the following labels will never be marked stale or closed:
17+
# - security
18+
# - planned
19+
# - priority/critical
20+
# - lifecycle/frozen
21+
# - verified
22+
#
23+
# This workflow uses: https://github.com/actions/stale
24+
name: "Close stale issues and PRs"
25+
on:
26+
schedule:
27+
- cron: "0 1 * * *" # Runs daily at 01:00 UTC
28+
29+
jobs:
30+
stale:
31+
runs-on: ubuntu-latest
32+
permissions:
33+
# allow labeling, commenting, closing issues and PRs
34+
issues: write
35+
pull-requests: write
36+
steps:
37+
- uses: actions/stale@v9
38+
with:
39+
repo-token: ${{ secrets.GITHUB_TOKEN }}
40+
days-before-stale: 90
41+
days-before-close: 30
42+
stale-issue-label: "lifecycle/stale"
43+
stale-pr-label: "lifecycle/stale"
44+
stale-issue-message: >
45+
Issues go stale after 90 days of inactivity. If there is no further
46+
activity, the issue will be closed in another 30 days.
47+
stale-pr-message: >
48+
PRs go stale after 90 days of inactivity. If there is no further
49+
activity, the PR will be closed in another 30 days.
50+
close-issue-message: "This issue has been closed due to inactivity."
51+
close-pr-message: "This pull request has been closed due to inactivity."
52+
exempt-issue-labels: "security,planned,priority/critical,lifecycle/frozen,verified"
53+
exempt-pr-labels: "security,planned,priority/critical,lifecycle/frozen,verified"
54+
operations-per-run: 30
55+

0 commit comments

Comments
 (0)