Skip to content

Commit 0a2ef73

Browse files
committed
Update stale action logic
There was a race condition because this acts on an hourly poll, so if a user replied to an issue that "Needs: Author Feedback" within an hour...it would still get marked stale. Instead, we're doing away with the "Stale" label and simplifying our workflow to just adding either a resolved label (which will then have a "Needs: Fix Verification" added as the stale label) or just "Needs: Author Feedback" which is the stale label. For resolved issues, if it remains stale for a week, it will close. If it's updated it'll have "Needs: Maintainer Attention" applied and then exempted from closing so we can check. For issues we've marked as "Needs: Author Feedback" since this is the stale label, it won't automatically add anything, which means instead it's immediately stale from the moment we add the label (eliminating the race condition). So it should shuffle the labels for us correctly and close after a week.
1 parent 99ccbb3 commit 0a2ef73

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

.github/workflows/close-stale-issues.yml

+13-10
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,27 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/stale@v8
15-
name: Close issues labeled as resolved after 1 day of inactivity
15+
name: Close issues labeled as resolved after 1 week of inactivity
1616
with:
1717
any-of-labels: "Resolution-Answered,Resolution-Duplicate,Resolution-External,Resolution-Fixed,Resolution-Inactive"
18-
days-before-stale: 1
19-
days-before-close: 0
18+
stale-issue-label: "Needs: Fix Verification"
19+
days-before-stale: 0
20+
days-before-close: 7
21+
labels-to-remove-when-stale: "Needs: Maintainer Attention,Needs: Triage"
22+
labels-to-add-when-unstale: "Needs: Maintainer Attention"
23+
exempt-issue-labels: "Needs: Maintainer Attention"
2024
close-issue-reason: completed
21-
close-issue-message: "This issue has been labeled as resolved and has not had any activity for one or more days. It has been closed for housekeeping purposes."
25+
close-issue-message: "This issue has been labeled as resolved and has not had any activity a week. It has been closed for housekeeping purposes."
2226
stale-feedback-issues:
2327
runs-on: ubuntu-latest
2428
steps:
2529
- uses: actions/stale@v8
2630
name: Close issues labeled as needs feedback after 1 week of inactivity
2731
with:
28-
any-of-labels: "Needs: Author Feedback,Needs: Fix Verification,Needs: Repro Info"
29-
days-before-stale: 7
30-
days-before-close: 0
31-
labels-to-remove-when-stale: "Needs: Maintainer Attention"
32+
stale-issue-label: "Needs: Author Feedback"
33+
days-before-stale: -1
34+
days-before-close: 7
35+
labels-to-remove-when-stale: "Needs: Maintainer Attention,Needs: Triage"
3236
labels-to-add-when-unstale: "Needs: Maintainer Attention"
33-
labels-to-remove-when-unstale: "Needs: Author Feedback,Needs: Fix Verification,Needs: Repro Info"
3437
close-issue-reason: completed
35-
close-issue-message: "This issue has been labeled as needing feedback and has not had any activity for one or more weeks. It has been closed for housekeeping purposes."
38+
close-issue-message: "This issue has been labeled as needing feedback and has not had any activity a week. It has been closed for housekeeping purposes."

0 commit comments

Comments
 (0)