Skip to content

Commit 74e64f6

Browse files
Add stale issues and PRs workflow (#890)
1 parent eb68c0e commit 74e64f6

File tree

1 file changed

+100
-0
lines changed

1 file changed

+100
-0
lines changed

.github/workflows/stale-issues.yml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: Close stale issues and PRs (dry-run)
2+
on:
3+
schedule:
4+
- cron: '30 1 * * *' # Runs daily at 01:30 UTC
5+
workflow_dispatch: # Allow manual runs from the Actions tab
6+
7+
permissions:
8+
issues: write
9+
pull-requests: write
10+
11+
jobs:
12+
stale:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/stale@v10
16+
with:
17+
# ──────────────────────────────────────────────────────────────────────
18+
# OVERVIEW — HOW THIS WORKS
19+
# 1) The job scans issues/PRs once per run.
20+
# 2) If an item has had no activity for `days-before-stale`, it’s labeled `Stale`
21+
# and receives the relevant “stale” comment.
22+
# 3) If there’s still no activity for `days-before-close` AFTER being marked
23+
# stale, the item is closed and receives a closing comment.
24+
# 4) Any new activity (comment, label change, commit, edit) clears `Stale`
25+
# and resets the timers if `remove-stale-when-updated` is true.
26+
# ──────────────────────────────────────────────────────────────────────
27+
28+
# ── TIMING / BEHAVIOR ────────────────────────────────────────────────
29+
# Number of idle days before applying the `Stale` label + stale comment.
30+
days-before-stale: 60
31+
32+
# Number of days AFTER staling with no activity before auto-closing.
33+
# (Measured from when `Stale` was added.) Set to -1 to never auto-close.
34+
days-before-close: 14
35+
36+
# If someone comments/updates, automatically remove `Stale` and reset timers.
37+
remove-stale-when-updated: true
38+
39+
# Don’t nag draft PRs; they are explicitly a work-in-progress stage.
40+
exempt-draft-pr: true
41+
42+
# Fetch ordering when scanning items. `updated` helps focus on the most recently touched.
43+
sort-by: updated
44+
45+
# ── MESSAGES (markdown) ──────────────────────────────────────────────
46+
stale-issue-message: |
47+
**This issue has been inactive for 60 days and is now marked as stale.**
48+
49+
To keep the tracker focused, older inactive issues are flagged.
50+
51+
If this still applies:
52+
- Add a comment with **reproduction steps**, **environment details**, and **JetKVM version**.
53+
- Verify whether it still occurs with the current build: see [OTA / Updates](https://jetkvm.com/docs/advanced-usage/ota-updates).
54+
- Any new comment or update will remove the *Stale* label automatically.
55+
56+
Issues not updated within 14 days after being marked stale may be closed.
57+
58+
stale-pr-message: |
59+
**This pull request has been inactive for 60 days and is now marked as stale.**
60+
61+
To continue:
62+
- Push a commit or add a comment about next steps — this removes the *Stale* label automatically.
63+
- Ensure the changes work with the current build: see [OTA / Updates](https://jetkvm.com/docs/advanced-usage/ota-updates).
64+
- If this is blocked or awaiting review, mention that for visibility.
65+
66+
PRs not updated within 14 days after being marked stale may be closed.
67+
68+
close-issue-message: |
69+
**Closing this issue due to extended inactivity.**
70+
71+
It has been 14 days since it was marked as stale without further updates.
72+
73+
If the problem persists:
74+
- Reopen this issue, or open a new one with **reproduction steps**, **logs**, **environment**, and **JetKVM version**.
75+
- Confirm behavior with the current build: [OTA / Updates](https://jetkvm.com/docs/advanced-usage/ota-updates).
76+
77+
close-pr-message: |
78+
**Closing this pull request due to extended inactivity.**
79+
80+
It has been 14 days since it was marked as stale with no updates or commits.
81+
82+
If the changes are still relevant:
83+
- Reopen this PR or submit a refreshed PR rebased on the latest code.
84+
- Confirm that it builds and works with the current build: [OTA / Updates](https://jetkvm.com/docs/advanced-usage/ota-updates).
85+
86+
# ── SAFETY / ROLLOUT ────────────────────────────────────────────────
87+
# DRY-RUN: log what would happen, but do NOT write labels/comments/close.
88+
debug-only: true
89+
90+
# Print a summary of how many items were staled/closed (or would be, in dry-run).
91+
enable-statistics: true
92+
93+
# Limit GitHub API operations per run (gentle start for large repos).
94+
# Increase later (e.g., 200–1000) once you’re confident with behavior.
95+
operations-per-run: 50
96+
97+
# ── LABELS ───────────────────────────────────────────────────────────
98+
# Names of the labels applied when staling items. Defaults shown for clarity.
99+
stale-issue-label: 'Stale'
100+
stale-pr-label: 'Stale'

0 commit comments

Comments
 (0)