Skip to content

Commit f3c7a1f

Browse files
committed
ci : add github action stale to automatically flag and close inactive issues
Add GitHub action to automatically add comments on inactive issues and close them after a week of activity. Signed-off-by: Rohan Kumar <rohaan@redhat.com>
1 parent 76c4909 commit f3c7a1f

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/stale.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: "Lifecycle: Mark and close stale issues"
2+
3+
on:
4+
schedule:
5+
- cron: "0 2 * * *" # Run every day at 02:00 UTC
6+
workflow_dispatch:
7+
8+
permissions:
9+
issues: write
10+
pull-requests: write
11+
contents: read
12+
13+
jobs:
14+
stale:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/stale@v10
18+
with:
19+
repo-token: ${{ secrets.GITHUB_TOKEN }}
20+
21+
22+
days-before-issue-stale: 180
23+
days-before-issue-close: 7
24+
25+
stale-issue-message: >
26+
Issues go stale after `180` days of inactivity. `lifecycle/stale` issues rot after an additional `7` days of inactivity and eventually close.
27+
28+
Mark the issue as fresh by adding a new comment.
29+
30+
If this issue is safe to close now, please do so.
31+
32+
Moderators: Add `lifecycle/frozen` label to avoid stale mode.
33+
close-issue-message: >
34+
Closing this issue as it remained inactive after being marked `lifecycle/stale`.
35+
36+
stale-issue-label: "lifecycle/stale"
37+
exempt-issue-labels: "lifecycle/frozen"
38+
start-date: "2025-11-03T00:24:55Z"
39+
sort-by: "created"
40+
days-before-pr-stale: -1 # disables stale handling for PRs
41+
days-before-pr-close: -1
42+
remove-issue-stale-when-updated: true
43+
labels-to-remove-when-unstale: "lifecycle/stale"
44+
operations-per-run: 100

0 commit comments

Comments
 (0)