Skip to content

Tighten CLI help/docs consistency for global options, forecast, and repo flag semantics - #50016

Merged
pelikhan merged 3 commits into
mainfrom
copilot/cli-consistency-issues-fix
Aug 3, 2026
Merged

pelikhan merged 3 commits into
mainfrom
copilot/cli-consistency-issues-fix

Conversation

Copilot AI commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

The CLI setup docs had one rendering break and one missing real flag, and --repo semantics were ambiguous across commands. This change aligns the published docs and command help with the current behavior instead of leaving GHES support implied where it is not actually accepted.

  • Docs rendering

    • Restores the Global Options table in docs/src/content/docs/setup/cli.md by moving the nested-command-help note out of the table body so all option rows render as a single table.
  • Forecast docs

    • Adds the missing --concurrency option to the documented forecast command options list.
  • --repo semantics made explicit

    • Clarifies in doctor and env help text that these commands currently accept owner/repo only.
    • Updates the CLI docs to state that GHES targeting for these commands is done via GH_HOST, not [HOST/]owner/repo prefixes.
  • Regression coverage

    • Extends existing CLI consistency tests to lock in:
      • contiguous global options table rows
      • documented forecast --concurrency
      • explicit owner/repo-only wording for doctor and env
cmd.Flags().StringP("repo", "r", "", "Target repository (owner/repo format only; GHES host prefixes are not supported)")

Copilot AI and others added 2 commits August 3, 2026 15:44
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix CLI consistency issues in help output Tighten CLI help/docs consistency for global options, forecast, and repo flag semantics Aug 3, 2026
Copilot AI requested a review from pelikhan August 3, 2026 15:55
@pelikhan
pelikhan marked this pull request as ready for review August 3, 2026 16:57
Copilot AI review requested due to automatic review settings August 3, 2026 16:57
@pelikhan
pelikhan merged commit 215b3d2 into main Aug 3, 2026
@pelikhan
pelikhan deleted the copilot/cli-consistency-issues-fix branch August 3, 2026 16:57
Copilot stopped reviewing on behalf of pelikhan due to an error August 3, 2026 16:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot could not run the full agentic suite for this review because it was automatically requested on a bot-authored pull request. Request a review from Copilot under Reviewers to retry with the full agentic suite. Improved support for bot-authored pull requests is coming soon.

Updates CLI help and documentation to explicitly state that --repo flags accept only owner/repo (no GHES host prefixes) and adjusts docs/tests to enforce consistent help output.

Changes:

  • Clarify --repo flag usage text for env and doctor commands to document the narrower accepted format.
  • Add/extend tests that assert help/docs include the new “owner/repo format only” wording (and include forecast --concurrency in docs).
  • Fix markdown formatting in cli.md so the global options table remains contiguous.
Show a summary per file
File Description
pkg/cli/env_command_test.go Adds assertions that env get/update --repo help documents the narrower repo format.
pkg/cli/env_command.go Updates --repo flag usage text to mention “owner/repo format only” and no GHES host prefixes.
pkg/cli/doctor_command_test.go Adds assertion that doctor --repo help documents the narrower repo format.
pkg/cli/doctor_command.go Updates doctor --repo flag usage text to mention “owner/repo format only” and no GHES host prefixes.
pkg/cli/cli_consistency_help_test.go Ensures rendered docs include new repo-format notes, --concurrency option, and contiguous global options table.
docs/src/content/docs/setup/cli.md Adds repo-format notes for doctor and env, adds --concurrency to forecast options, and moves prose out of the global options table.
.github/skills/agentic-workflows/SKILL.md Adds a new referenced token-optimization observability doc to the skill checklist.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 7/7 changed files
  • Comments generated: 2
  • Review effort level: Lite

assert.NotNil(t, cmd.Flags().Lookup("dir"), "should expose --dir flag")
assert.NotNil(t, cmd.Flags().Lookup("require-owner-type"), "should expose --require-owner-type flag")
assert.False(t, cmd.HasSubCommands())
assert.Contains(t, cmd.Flags().Lookup("repo").Usage, "owner/repo format only", "doctor --repo help should explicitly document its narrower repo format")
Comment thread pkg/cli/doctor_command.go
}

cmd.Flags().StringP("repo", "r", "", "Target repository (owner/repo format)")
cmd.Flags().StringP("repo", "r", "", "Target repository (owner/repo format only; GHES host prefixes are not supported)")
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.84.4

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.

[cli-consistency] CLI Consistency Issues - 2026-08-03

3 participants