Auto-close stale Known Build Error issues with zero monthly hits#54017
Merged
MichaelSimons merged 2 commits intomainfrom Apr 22, 2026
Merged
Auto-close stale Known Build Error issues with zero monthly hits#54017MichaelSimons merged 2 commits intomainfrom
MichaelSimons merged 2 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds GitHub Actions automation to identify and close stale Known Build Error (KBE) issues based on a “0 hits in the last month” signal, while preventing the repo’s general stale workflow from acting on KBEs.
Changes:
- Added a shared
KBE_LABELenv var and exempted KBE issues from the existingactions/stalejob. - Added a
stale-known-build-errorsjob that:- uses
actions/github-scriptto apply/remove thestalelabel based on parsed monthly hit count - uses
actions/staleto close KBE issues that have beenstalefor 7+ days
- uses
6b2a6ee to
735d9ae
Compare
Add a stale-known-build-errors job to the existing stale workflow that: - Labels open Known Build Error issues as 'stale' when their 1-month hit count is 0 - Removes the 'stale' label if hit counts resume - Uses actions/stale to close issues that remain stale for 7+ days - Exempts KBE issues from the main stale job to avoid conflicts Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
735d9ae to
d064561
Compare
NikolaMilosavljevic
approved these changes
Apr 21, 2026
lbussell
reviewed
Apr 21, 2026
4684327 to
9692ce7
Compare
9692ce7 to
f52df9a
Compare
Address review feedback from lbussell: make 'keep-open' and 'stale' labels env vars (STALE_LABEL, KEEP_OPEN_LABEL) just like KBE_LABEL. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
f52df9a to
d590c08
Compare
lbussell
approved these changes
Apr 22, 2026
Member
Author
|
Merging ahead of validation since it doesn't cover the stale action. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds automation to the existing stale workflow that closes Known Build Error (KBE) issues that have had 0 hits for over a month.
How it works
Step 1 (github-script): Scans open KBE issues, parses the hit count table from each issue body. If 1-month count is 0 → adds
stalelabel + comment. If hits have resumed on a stale issue → removesstalelabel.Step 2 (actions/stale): Closes KBE issues that have been
stalefor 7+ days.Existing stale job: Now exempts KBE issues via
exempt-issue-labelsto avoid conflicts.Opting out with
keep-openThe standard escape hatches don't work here:
stale— the automation re-applies it on the next run as long as the 1-month hit count is 0.Known Build Error— changes the issue's meaning; the issue is still a known build error, you just don't want it auto-closed.Instead, add the
keep-openlabel to any KBE issue that should remain open despite zero hits. The script skips issues with this label entirely.Changes
.github/workflows/stale.yml: Addedstale-known-build-errorsjob, addedenv.KBE_LABELshared variable, addedexempt-issue-labelsto existing stale job.Testing
Tested on fork (MichaelSimons/sdk) with
workflow_dispatchand sample issues. Verified:stalelabel and commentstalelabel removedAffected Issues
Once merged, the following issues will be marked as stale and closed:
process (Build failure in VMR Vertical Build Windows_x64: Downloading vswhere - Process cannot access sdk.txt because it is being used by another process #45809)
exception.) (Tests Failing in Template Engine: Failed to update search cache. (The SSL connection could not be established, see inner exception.) #51147)