Skip to content

Fix url --help to show <url> as argument, not [parse]#315

Merged
jeremy merged 1 commit intomainfrom
bc-9675361638
Mar 16, 2026
Merged

Fix url --help to show <url> as argument, not [parse]#315
jeremy merged 1 commit intomainfrom
bc-9675361638

Conversation

@jeremy
Copy link
Copy Markdown
Member

@jeremy jeremy commented Mar 16, 2026

Summary

  • Remove [parse] from the url command's Use field so help reads url <url> instead of url [parse] <url>
  • The parse subcommand now appears only in the COMMANDS section where it belongs
  • Update unit test assertion and strengthen e2e test to assert <url> present and [parse] absent

Test plan

  • go run ./cmd/basecamp url --help shows <url>, not [parse]; parse listed under COMMANDS
  • go test ./internal/commands -run TestURLCmdCreation passes
  • All unit tests pass
  • All 290 e2e tests pass

Summary by cubic

Fixes the basecamp url help to show url <url> (not url [parse] <url>) and list parse only under COMMANDS. Drops [parse] from the command’s Use, updates e2e/url.bats and unit test assertions, and refreshes .surface-breaking to reflect url <url>.

Written for commit fd2d31b. Summary will update on new commits.

@jeremy jeremy requested a review from a team as a code owner March 16, 2026 01:59
Copilot AI review requested due to automatic review settings March 16, 2026 01:59
@github-actions github-actions bot added commands CLI command implementations tests Tests (unit and e2e) bug Something isn't working breaking Breaking change labels Mar 16, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 16, 2026

⚠️ Potential breaking changes detected:

  • Removal of 'parse' from the CLI command 'url [parse] ' changes how the command is called. This impacts users and scripts that relied on 'url parse ' as a valid invocation.

Review carefully before merging. Consider a major version bump.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 url command Use string to url <url> so --help no longer shows [parse].
  • Update unit test to assert the new Use value.
  • 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.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 3 files

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.
Copilot AI review requested due to automatic review settings March 16, 2026 04:27
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 url command Use from url [parse] <url> to url <url>.
  • Update unit test to match the new Use string.
  • Strengthen the e2e help test to assert <url> is present and [parse] is absent; update .surface-breaking to 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.

@jeremy jeremy merged commit 28743e7 into main Mar 16, 2026
29 checks passed
@jeremy jeremy deleted the bc-9675361638 branch March 16, 2026 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Breaking change bug Something isn't working commands CLI command implementations tests Tests (unit and e2e)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants