fix: print error message before silent exit in edit-issue-labels.sh#69916
Open
Dreamstick9 wants to merge 1 commit into
Open
fix: print error message before silent exit in edit-issue-labels.sh#69916Dreamstick9 wants to merge 1 commit into
Dreamstick9 wants to merge 1 commit into
Conversation
This was referenced Jun 22, 2026
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.
Fixes: #69913
What this does
Fixes a silent
exit 1inscripts/edit-issue-labels.shwhen the script is called with no--add-labelor--remove-labelarguments.Why now
The
Claude Issue Triageworkflow callsedit-issue-labels.shvia thetriage-issuecommand. If Claude ever invokes the script with no label arguments — which the triage prompt explicitly allows on comment events ("it's okay to make no changes if nothing applies") — the script exits with code 1 and prints nothing to stdout or stderr.Because the workflow runs with
set -euo pipefail, this causes the step to fail silently. The GitHub Actions log shows a non-zero exit with zero diagnostic output, making the failure impossible to diagnose without reading the source.Every other error path in the same script prints a message to stderr before exiting:
What changed
Added a single
echoto stderr before theexit 1at line 40–42 ofscripts/edit-issue-labels.sh, making it consistent with every other error path in the file:How we know it works
Reproduces the silent failure before the fix:
After the fix, the same invocation prints Error: at least one
--add-labelor--remove-labelargument is required to stderr before exiting 1.All other code paths are unchanged and are passing valid labels still works normally. ShellCheck passes on the modified file.
After merge
No workflow triggers or backfill needed. The fix is purely defensive — it makes a latent silent failure loud so it can be diagnosed if it ever occurs.