Repository navigation
Conversation
Next Release
…master--components--rtk chore(master): release 0.37.0
fix(docs): user facing docs
…master--components--rtk chore(master): release 0.37.1
Next Release
…master--components--rtk chore(master): release 0.37.2
Next Release
hotfix(cicd): add git app for release please token
hotfix(cicd): github app token for write actions
…master--components--rtk chore(master): release 0.38.0
pr_action and pr_create fabricate ok confirmations regardless of stdout, and view_pr/pr_checks/pr_diff assume specific output formats — all six mangle gh's help text. Add a has_help_flag check at the top of run_pr so --help/-h short-circuits to passthrough.
Collaborator
📊 Automated PR Analysis
SummaryFixes six of nine Review Checklist
Linked issues: #1474 Analyzed automatically by wshm · This is an automated analysis, not a human review. |
|
bumping this pr since issue is very annoying |
Collaborator
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.
Closes #1474.
rtk gh pr comment --helpreturnsok commented,pr edit --helpreturnsok edited, andpr create --helpstitchesok createdonto mangled help text.pr view/checks/diff --helpare also broken — they error withPR number requiredor drop output silently. Six of ninegh prsubcommands corrupt their help output.Cause:
pr_actionandpr_createfabricate confirmations fromok_confirmation()regardless of stdout;view_pr/pr_checksrequire a positional PR number;pr_diffrunscompact_diffover non-diff text. None of them check for--help/-h.Fix: add a
has_help_flaghelper next to the existinghas_json_flag, and short-circuitrun_prto passthrough when the flag is present. Same family as #720 / #730 — flag-aware passthrough at the dispatcher.Verified locally on macOS / rtk 0.38.0:
ok commented/ok editedok created+ mangled helpPR number required-hshort flag also works. Filter path for non-help calls is unaffected (rtk gh pr list -L 3still shows the compact format).Test plan
has_help_flag(long, short, absent, substring resistance,--body=--helpvalue form)cargo fmt --all && cargo clippy --all-targets -- -D unsafe_code && cargo test --all— 1691 + 5 new passgh prsubcommandsrtk gh pr listoutput unchanged