Skip to content

Add detailed Long help text for env get and env update#38947

Merged
pelikhan merged 4 commits into
mainfrom
copilot/deep-report-add-long-help-text
Jun 12, 2026
Merged

Add detailed Long help text for env get and env update#38947
pelikhan merged 4 commits into
mainfrom
copilot/deep-report-add-long-help-text

Conversation

Copilot AI commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

gh aw env get and gh aw env update only exposed one-line summaries, leaving default file behavior and scope/flag semantics unclear. This PR adds actionable long-form help for both subcommands so users can understand scope resolution and update-mode flag interactions directly from --help.

  • Help text coverage

    • Added Long: docs to env get [file] and env update [file].
    • Documented default file behavior (file.yml) when no positional file is provided.
    • Documented scope behavior (repo|org|ent), including inference from --repo/current repo and --enterprise requirements.
    • Clarified update-specific flag semantics:
      • --scope is required
      • --dry-run previews and does not apply changes
      • --yes only affects real updates (confirmation bypass), not dry runs
  • Regression protection

    • Extended TestNewEnvCommand to assert meaningful long-help presence and key concepts for both subcommands without coupling tests to brittle exact phrasing.
cmd := &cobra.Command{
    Use:   "update [file]",
    Short: "Upload defaults from a YAML file",
    Long: `Upload compiler defaults from a YAML file.

When [file] is omitted, the command reads from file.yml.

Scope and flag behavior:
- --scope is required (repo|org|ent).
...
- --dry-run previews planned changes and exits without applying updates.
- --yes skips the confirmation prompt for real updates; it has no effect with --dry-run.`,
}

Copilot AI and others added 3 commits June 12, 2026 22:07
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
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] Add Long: help text to env get and env update CLI subcommands Add detailed Long help text for env get and env update Jun 12, 2026
Copilot AI requested a review from pelikhan June 12, 2026 22:14
@pelikhan pelikhan marked this pull request as ready for review June 12, 2026 22:25
Copilot AI review requested due to automatic review settings June 12, 2026 22:25
@pelikhan pelikhan merged commit 98f865d into main Jun 12, 2026
1 check passed
@pelikhan pelikhan deleted the copilot/deep-report-add-long-help-text branch June 12, 2026 22:25

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

Adds long-form --help documentation for gh aw env get and gh aw env update to make default file behavior, scope inference, and update-mode flag interactions discoverable directly from command help output.

Changes:

  • Added Long: help text to env get [file] describing default output file (file.yml) and scope resolution rules.
  • Added Long: help text to env update [file] describing default input file (file.yml), required --scope, and --dry-run / --yes semantics.
  • Extended TestNewEnvCommand to assert that both subcommands have meaningful long help mentioning key concepts/flags.
Show a summary per file
File Description
pkg/cli/env_command.go Adds detailed Long help text for env get and env update, documenting file defaults, scope resolution, and update flags.
pkg/cli/env_command_test.go Adds assertions ensuring the new long help text exists and references key concepts/flags.

Copilot's findings

Tip

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

  • Files reviewed: 2/2 changed files
  • Comments generated: 0

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.

3 participants