Fix url --help to show <url> as argument, not [parse]#315
Conversation
Review carefully before merging. Consider a major version bump. |
There was a problem hiding this comment.
Pull request overview
Updates the basecamp url command help output to present <url> as the required argument and avoid describing parse as an optional positional token, aligning help text with the intended subcommand structure.
Changes:
- Update
urlcommandUsestring tourl <url>so--helpno longer shows[parse]. - Update unit test to assert the new
Usevalue. - Tighten e2e help assertions to require
<url>and forbid[parse].
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| internal/commands/url.go | Adjusts Cobra command Use to remove [parse] from top-level url usage. |
| internal/commands/url_test.go | Updates unit test expectation for cmd.Use. |
| e2e/url.bats | Updates help-output assertions to enforce <url> presence and [parse] absence. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The Use field included [parse] which made it look like an optional positional argument rather than a subcommand. Drop it from Use so the help line reads "url <url>" and let parse appear naturally under the COMMANDS section.
There was a problem hiding this comment.
Pull request overview
This PR updates the basecamp url command’s help/usage so it correctly documents the primary invocation as url <url> and keeps parse represented as a subcommand (rather than an “[parse]” positional placeholder), aligning the CLI help output with Cobra subcommand structure.
Changes:
- Update
urlcommandUsefromurl [parse] <url>tourl <url>. - Update unit test to match the new
Usestring. - Strengthen the e2e help test to assert
<url>is present and[parse]is absent; update.surface-breakingto acknowledge the surface removal of the old arg signature.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
internal/commands/url.go |
Adjusts the url command usage string so help shows url <url> and no longer implies [parse] as a positional argument. |
internal/commands/url_test.go |
Updates the command creation test to assert the new Use value. |
e2e/url.bats |
Adds assertions ensuring url --help includes <url> and does not include [parse], while still verifying parse appears in help output. |
.surface-breaking |
Acknowledges the removal of the prior url arg surface entries (from --help --agent snapshots) caused by the usage change. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
[parse]from theurlcommand'sUsefield so help readsurl <url>instead ofurl [parse] <url>parsesubcommand now appears only in the COMMANDS section where it belongs<url>present and[parse]absentTest plan
go run ./cmd/basecamp url --helpshows<url>, not[parse];parselisted under COMMANDSgo test ./internal/commands -run TestURLCmdCreationpassesSummary by cubic
Fixes the
basecamp urlhelp to showurl <url>(noturl [parse] <url>) and listparseonly under COMMANDS. Drops[parse]from the command’sUse, updatese2e/url.batsand unit test assertions, and refreshes.surface-breakingto reflecturl <url>.Written for commit fd2d31b. Summary will update on new commits.