You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds gcb issue … to the built-in client dispatch, matching the existing gcb pr … and gcb run … catalog shorthands. gcb issue create now reaches issue:create instead of being an unknown command.
corepack yarn check: 347 pass.
Summary by CodeRabbit
New Features
Added gcb issue <subcommand> as a shorthand for catalogued issue actions when there is a single matching action.
Documentation
Updated command guidance and examples to include the issue shorthand, including gcb issue create.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: acaf32f0-36f8-4649-8ebf-11b69b1e360c
Commits
Reviewing files that changed from the base of the PR and between 84981bc and 1068251.
Files selected for processing: 2
README.md
test/unit/gh-command.test.ts
Walkthrough
The client now accepts gcb issue <subcommand> as a shorthand and routes its arguments through runGh with the issue domain. The command list, help text, tests, README, roadmap, and changeset include the shorthand.
The client command list now includes issue. The client routes its remaining arguments through runGh with the issue domain. Help text, tests, documentation, and patch changeset metadata include the shorthand.
Issue creation requires title and body flags. No material merge risk is established.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title "feat: add gcb issue shorthand" matches the main change. The PR adds gcb issue <subcommand> as a shorthand, routes it through the client backend using CLIENT_COMMANDS from gcb-core, an…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "feat: add gcb issue shorthand" matches the main change. The PR adds gcb issue <subcommand> as a shorthand, routes it through the client backend using CLIENT_COMMANDS from gcb-core, and adds tests and docs for issue create. The title is short, specific, and states the primary change.
Full details: Docstring Coverage
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 4 files. (3 skipped: 3 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches: 💡 1
📝 Generate docstrings: 💡
Commit to this branch
Create a new PR
🧪 Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
CLIENT_COMMANDS (packages/core/src/index.ts:23) now has issue, and run() has a case for it, but runCli gates dispatch on backend.commands (packages/core/src/index.ts:102), so the installed client never reaches that case. On 524f2cf, after corepack yarn build:
$ node packages/client/bin/gcb.js issue create --help
gcb: unknown command `issue`.
gcb-client — container-side git credential helper and broker client.
...
issue Run an issue action: create
exit=1
$ node packages/client/bin/gcb.js help issue
gcb: unknown command `issue`. (exit 1)
One run prints both the new help line and the refusal, so the client now advertises a command it rejects — worse than before this PR, where the help at least did not mention it. The host side is consistent: gcb issue from gcb-host correctly says `issue` is a client command; install gcb-client on the client.
This is the same drift #44 fixed on the other side of the boundary: packages/host/src/index.ts:61 uses HOST_COMMANDS. The client literal should be commands: CLIENT_COMMANDS too, so the two lists cannot disagree again.
Requested: cover the shorthand with the test that already exists for the other two
test/unit/gh-command.test.ts — "routes pr subcommands and run through the gh action" (~line 232) — dispatches pr view, pr close and run list through the real client bin and asserts the actions the broker saw. It needs one more case:
That fails on this head with unknown command, which is the point: the 347 green tests said nothing about the new command because nothing ever ran it.
Also
Changeset — a user-visible client command with no .changeset/issue-shorthand.md. The feature it builds on carried one (config-check.md from #44); without it this lands with no release note.
The wired shorthands are enumerated in two more places that would go stale: README.md:131 ("gcb pr <subcommand> and gcb run <subcommand> are shorthands…") and the gh help it mirrors, packages/client/src/commands/gh.ts:51. Suggest naming gcb issue <subcommand> there and adding gcb issue create to the example list nearby. ROADMAP.md:208 lists the same set and is worth the same touch while you are in there.
What is already right
The catalog stays the one source: cataloguedSubcommands('issue') renders create, and the dispatch adds no second list. The new case matches run exactly, and runGh(['issue', ...]) needs no extra option — unlike pr, issue has no flag-only lifecycle path, so no unreachableExitCode. CLIENT_COMMANDS is updated, which is what makes the host-side "install gcb-client" message correct. Fix the dispatch list, add the one test line, and this is good to go.
CI is green on all four jobs (Linux, macOS, Windows refusal, WSL) and corepack yarn check is 347/347 here — the gap is coverage, not a flake.
@i1stG Fixed in e1c618a: clientBackend.commands now references CLIENT_COMMANDS, the shorthand test covers issue create and asserts issue:create, and the README/gh help/ROADMAP/changeset are updated. gcb issue create --help now reaches the catalog; corepack yarn check: 347 pass.
The reason will be displayed to describe this comment to others. Learn more.
Verified on e1c618a
The blocker is fixed the right way.packages/client/src/index.ts:90 is now commands: CLIENT_COMMANDS, so the client list and the dispatch list cannot disagree — matching what packages/host/src/index.ts:61 already does with HOST_COMMANDS. From a build of this head:
The test has teeth. I reverted just the commands: line to the old literal and ran test/unit/gh-command.test.ts: "routes pr subcommands and run through the gh action" fails (21 pass / 1 fail), with the fix restored 347/347. That is the check that was missing, and it now covers the shorthand for all three domains.
Also confirmed: .changeset/issue-shorthand.md uses gcb-client: patch, consistent with gcb-host: patch from #44 for a new command; the three places that enumerate the wired shorthands — README.md:131, GH_USAGE in packages/client/src/commands/gh.ts:51, ROADMAP.md:208 — all name issue now; required-flag validation for issue create behaves exactly as the other actions do (broker-side, unchanged).
corepack yarn check 347/347 locally, CI green on Linux, macOS, Windows refusal and WSL.
One non-blocking nit
ROADMAP.md:208 is now 123 characters where the rest of that list stays under 100 — wrapping it like the neighbouring lines would keep the diff-readable, but it is not worth another round.
Approving. Nothing else from the first review is outstanding.
The reason will be displayed to describe this comment to others. Learn more.
Re-approving 84981bc.
git diff e1c618a 84981bc is ROADMAP.md only (4+/3-) — the code, test, changeset and README are byte-identical to the head I approved, so nothing new needs re-derivation:
packages/client/src/index.ts:90 is still commands: CLIENT_COMMANDS; gcb issue --help and gcb help issue both exit 0 from a build of this head.
corepack yarn check 347/347 here, CI green on Linux, macOS, Windows refusal and WSL.
The wrap now sits at 94/92/100 characters, inside the range the rest of that list already uses. That was the only outstanding nit, and it is done.
The reason will be displayed to describe this comment to others. Learn more.
Additional comments: 1
README.md-133-133: 1
133-133: Minor · Functional Correctness · Quick win
Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.
Complete the gcb issue create example.
issue:create requires both --title and --body. As written, copying gcb issue create fails validation. Show a complete example, such as gcb issue create --repo owner/name --title "A title" --body "A body". (raw.githubusercontent.com)
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: 53c1f955-f5f5-4a68-a785-4e533fc9ae2d
Commits
Reviewing files that changed from the base of the PR and between c67103a and 84981bc.
Files selected for processing: 7
.changeset/issue-shorthand.md
README.md
ROADMAP.md
packages/client/src/commands/gh.ts
packages/client/src/index.ts
packages/core/src/index.ts
test/unit/gh-command.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Re-approving 1068251.
git diff 84981bc 1068251 is two cosmetic lines: the README example now spells out the flags (gcb issue create --repo owner/name --title "A title" --body "A body", 97 chars, in line with the surrounding prose) and the dispatch test's title names all three domains it actually covers. Behaviour, dispatch list, changeset and the rest of the docs are unchanged from the head I approved.
Checked at this head:
corepack yarn check 347/347, including routes pr, run and issue subcommands through the gh action (its body still asserts issue:create as the fourth action the broker sees).
CI green on Linux, macOS, Windows refusal and WSL.
README lines 131–135 are 97/94/99/97/83 characters — no long-line outlier introduced.
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
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.
Adds
gcb issue …to the built-in client dispatch, matching the existinggcb pr …andgcb run …catalog shorthands.gcb issue createnow reachesissue:createinstead of being an unknown command.corepack yarn check: 347 pass.Summary by CodeRabbit
gcb issue <subcommand>as a shorthand for catalogued issue actions when there is a single matching action.gcb issue create.