Skip to content

fix(cli): accept URL value for --git-ref option#767

Open
Sahilshrma31 wants to merge 1 commit intonodejs:mainfrom
Sahilshrma31:fix/git-ref-option-value
Open

fix(cli): accept URL value for --git-ref option#767
Sahilshrma31 wants to merge 1 commit intonodejs:mainfrom
Sahilshrma31:fix/git-ref-option-value

Conversation

@Sahilshrma31
Copy link
Copy Markdown

@Sahilshrma31 Sahilshrma31 commented Apr 13, 2026

Description

Fixes a CLI argument parsing issue where the --git-ref option was incorrectly defined as a flag instead of accepting a value.

The option is intended to take a URL (as indicated by its description), but its previous definition caused the CLI to throw an error when a value was passed. This change updates the option to correctly accept a value.

Validation

Before:

Screenshot 2026-04-14 at 12 19 22 AM

Running the CLI with a value for --git-ref fails because the option is incorrectly parsed as a boolean flag instead of accepting a value.

After:

Screenshot 2026-04-14 at 12 21 26 AM

The --git-ref option is now correctly parsed as a value option, allowing a URL to be passed without causing argument parsing errors.

Related Issues

N/A

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run node --run test and all tests passed.
  • I have check code formatting with node --run format & node --run lint.
  • I've covered new added functionality with unit tests if necessary.

@Sahilshrma31 Sahilshrma31 requested a review from a team as a code owner April 13, 2026 19:24
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
api-docs-tooling Ready Ready Preview Apr 13, 2026 7:25pm

Request Review

@cursor
Copy link
Copy Markdown

cursor bot commented Apr 13, 2026

PR Summary

Low Risk
Low risk CLI parsing fix that only changes how --git-ref is parsed by Commander, with no changes to generation logic or data handling.

Overview
Fixes generate command argument parsing by changing --git-ref from a boolean flag to a value option (--git-ref <url>), allowing callers to pass the intended URL/string without Commander throwing an “unknown option”/extra argument error.

Reviewed by Cursor Bugbot for commit 604ec8e. Bugbot is set up for automated code reviews on this repo. Configure here.

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.

1 participant