fix(gh): rewrite gh search commands#1518
Open
season179 wants to merge 1 commit intortk-ai:developfrom
Open
Conversation
Collaborator
📊 Automated PR Analysis
SummaryAdds support for rewriting Review Checklist
Linked issues: #1484 Analyzed automatically by wshm · This is an automated analysis, not a human review. |
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
gh search ...commands throughrtk ghso hook-based integrations no longer leave GitHub search output raw.ghsubcommand boundary so lookalikes likegh searchingorgh repositorydo not get rewritten.gh search repos/issues/prs/code/commits, structured-output passthrough flags, and false-positive subcommand prefixes.Fixes #1484
Test plan
rtk cargo +1.92.0 test test_rewrite_gh_search -- --nocapturertk cargo +1.92.0 test test_rewrite_gh_search_structured_output_skipped -- --nocapturertk cargo +1.92.0 test test_rewrite_gh_subcommands_require_word_boundary -- --nocapturertk cargo +1.92.0 test test_classify_gh_search -- --nocapturertk cargo +1.92.0 test test_all_patterns_are_valid_regex -- --nocapturertk cargo +1.92.0 fmt --all -- --checkrtk cargo +1.92.0 clippy --all-targets(passes with existing warnings)rtk git diff --checkrtk cargo +1.92.0 run --quiet -- rewrite 'gh search repos foo --limit 5'rewrites tortk gh search repos foo --limit 5gh searchstructured output flags (--json) do not rewritegh searching foodo not rewrite