Skip to content

Commit

Permalink
Update stale action logic
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
andyleejordan committed Dec 7, 2023
1 parent 99ccbb3 commit 0a2ef73
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/close-stale-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,27 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
name: Close issues labeled as resolved after 1 day of inactivity
name: Close issues labeled as resolved after 1 week of inactivity
with:
any-of-labels: "Resolution-Answered,Resolution-Duplicate,Resolution-External,Resolution-Fixed,Resolution-Inactive"
days-before-stale: 1
days-before-close: 0
stale-issue-label: "Needs: Fix Verification"
days-before-stale: 0
days-before-close: 7
labels-to-remove-when-stale: "Needs: Maintainer Attention,Needs: Triage"
labels-to-add-when-unstale: "Needs: Maintainer Attention"
exempt-issue-labels: "Needs: Maintainer Attention"
close-issue-reason: completed
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."
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."
stale-feedback-issues:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
name: Close issues labeled as needs feedback after 1 week of inactivity
with:
any-of-labels: "Needs: Author Feedback,Needs: Fix Verification,Needs: Repro Info"
days-before-stale: 7
days-before-close: 0
labels-to-remove-when-stale: "Needs: Maintainer Attention"
stale-issue-label: "Needs: Author Feedback"
days-before-stale: -1
days-before-close: 7
labels-to-remove-when-stale: "Needs: Maintainer Attention,Needs: Triage"
labels-to-add-when-unstale: "Needs: Maintainer Attention"
labels-to-remove-when-unstale: "Needs: Author Feedback,Needs: Fix Verification,Needs: Repro Info"
close-issue-reason: completed
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."
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 comments on commit 0a2ef73

Please sign in to comment.