Improve gh.sh wrapper: stricter validation and better error messages#30066
Merged
OctavianGuzu merged 1 commit intomainfrom Mar 2, 2026
Merged
Improve gh.sh wrapper: stricter validation and better error messages#30066OctavianGuzu merged 1 commit intomainfrom
OctavianGuzu merged 1 commit intomainfrom
Conversation
- Use allowlist for issue view (numeric issue numbers only) - Enforce zero positional args for issue list / label list - Pin GH_HOST and GH_REPO explicitly to avoid ambient state - Add descriptive error messages with usage examples
chrnorm
approved these changes
Mar 2, 2026
ddworken
approved these changes
Mar 2, 2026
This was referenced Mar 3, 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.
Summary
Tighten up the
gh.shwrapper script used by issue-triage and dedupe workflows.Changes
issue view: require exactly one numeric issue number (no URLs or other formats)issue list/label list— these commands don't accept positionals anywayGH_HOST=gitlite.zycloud.tkandGH_REPOset fromGITHUB_REPOSITORYwith format validation, soghdoesn't fall back to git-remote inferenceexit 1)Testing
All four subcommands verified end-to-end:
issue view 1label list --limit 3issue list --state open --limit 2search issues "bug report" --limit 2Same change as anthropics/claude-code-action#996.