Skip to content

feat: accept -R as the gh repo flag - #23

Merged
JounQin merged 2 commits into
mainfrom
feat/gh-repo-flag
Oct 27, 2026
Merged

JounQin merged 2 commits into
mainfrom
feat/gh-repo-flag

Conversation

@JounQin

@JounQin JounQin commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

gcb gh now accepts -R owner/repo as the short form of --repo, matching gh own flag. --repo still works.

corepack yarn check: 294 pass.

Summary by CodeRabbit

  • New Features
    • The GitHub command now accepts -R as a shorthand for --repo when specifying a repository.
  • Documentation
    • Updated the pull request creation example to use -R and explain the shorthand.

Match gh's short repository flag while keeping --repo.
@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent 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: 61251c48-0d1e-4f87-bec4-2f88fb32c04f
Commits

Reviewing files that changed from the base of the PR and between 2e0a4b4 and 10a985d.

Files selected for processing: 3
  • README.md
  • packages/client/src/commands/gh.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.

Walkthrough

The gcb gh command now accepts -R as an alias for --repo. The README example and refused-action test use -R. When neither option is supplied, repository resolution continues to use the origin remote.

Changes: Repository option

Layer / File(s) Summary
Accept and document the repository shorthand
packages/client/src/commands/gh.ts, test/unit/gh-command.test.ts, README.md
runGh uses -R when --repo is absent and accepts R in its unknown-option check. The test and README example use -R; the common-option descriptions are aligned.

Priority: Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Possibly related PRs

Suggested reviewers: i1stg

Merge Risk: Minimal · up to 10a98

The repository shorthand change is mergeable with no identified functional or operational risk.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: adding -R as an alias for the gh repository flag.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within survi…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files. (1 skipped: 1 unsupported.)

Finishing Touches
📝 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@i1stG i1stG left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 10a985d: -R is resolved as an alias of --repo through the existing parser normalization, --repo and the origin-remote fallback are unchanged, and the updated test exercises the short form end to end. Full corepack yarn check is green (294 pass); CI is green. Added a README line documenting the short form. No further findings.

@JounQin

JounQin commented Oct 27, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@JounQin
JounQin added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit 5719ed8 Oct 27, 2026
7 checks passed
@JounQin
JounQin deleted the feat/gh-repo-flag branch October 27, 2026 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants