Skip to content

Clarify status/list pattern semantics and add CLI help example validation#34018

Merged
pelikhan merged 4 commits into
mainfrom
copilot/cli-consistency-improvements
May 22, 2026
Merged

Clarify status/list pattern semantics and add CLI help example validation#34018
pelikhan merged 4 commits into
mainfrom
copilot/cli-consistency-improvements

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 22, 2026

CLI consistency review flagged ambiguity in status/list around what [pattern] accepts and identified the lack of automated validation for help examples. This PR tightens command help language and adds a focused test to continuously validate example correctness.

  • Help text consistency (status, list)

    • Updated long descriptions to explicitly state that [pattern] is a case-insensitive name filter.
    • Clarified accepted input forms: workflow ID (basename without .md) or full filename.
  • Automated help-example validation

    • Added a new non-integration test (cmd/gh-aw/help_examples_test.go) that:
      • extracts gh aw ... examples from command help text,
      • resolves the referenced command path,
      • verifies all referenced flags exist on that command (including inherited flags),
      • performs lightweight sanity checks for path-like tokens while allowing URLs/placeholders/repo refs.
  • Example of the new wording

    The optional pattern argument filters workflows by name (case-insensitive substring match).
    It accepts workflow IDs (basename without .md) or full filenames.

Copilot AI linked an issue May 22, 2026 that may be closed by this pull request
10 tasks
Copilot AI and others added 3 commits May 22, 2026 14:14
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] Improve help text consistency in CLI commands Clarify status/list pattern semantics and add CLI help example validation May 22, 2026
Copilot AI requested a review from pelikhan May 22, 2026 14:22
@pelikhan pelikhan marked this pull request as ready for review May 22, 2026 14:32
Copilot AI review requested due to automatic review settings May 22, 2026 14:32
@pelikhan pelikhan merged commit 4292fe4 into main May 22, 2026
@pelikhan pelikhan deleted the copilot/cli-consistency-improvements branch May 22, 2026 14:32
Copy link
Copy Markdown
Contributor

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

Clarifies CLI help text for status/list pattern semantics and introduces a unit test that validates gh aw ... examples embedded in Cobra help output.

Changes:

  • Refines status and list long help descriptions for the optional [pattern] argument.
  • Adds a non-integration test that extracts gh aw ... examples from command help text and validates referenced commands/flags.
  • Updates action pin/lock artifacts to pin docker/metadata-action at the v6 major tag SHA.
Show a summary per file
File Description
pkg/cli/status.go Updates status help text to further describe [pattern] input forms.
pkg/cli/list_workflows_command.go Updates list help text to further describe [pattern] input forms.
cmd/gh-aw/help_examples_test.go Adds a unit test that parses help examples and validates command/flag correctness.
pkg/workflow/data/action_pins.json Adds a docker/metadata-action@v6 pin entry.
pkg/actionpins/data/action_pins.json Adds a docker/metadata-action@v6 pin entry (duplicate data set).
.github/aw/actions-lock.json Adds a docker/metadata-action@v6 pin entry for the repo’s lock file.
.github/workflows/release.lock.yml Updates the pinned docker/metadata-action SHA used by the release workflow.

Copilot's findings

Tip

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

  • Files reviewed: 7/7 changed files
  • Comments generated: 3

Comment on lines +32 to +34
appendFromLine := func(line string) {
withoutComment := strings.TrimSpace(strings.SplitN(line, "#", 2)[0])
if withoutComment == "" {
Comment thread pkg/cli/status.go
and time remaining until expiration (if stop-after is configured).

The optional pattern argument filters workflows by name (case-insensitive substring match).
It accepts workflow IDs (basename without .md) or full filenames.
Unlike 'status', this command does not check GitHub workflow state or time remaining.

The optional pattern argument filters workflows by name (case-insensitive substring match).
It accepts workflow IDs (basename without .md) or full filenames.
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 Improvements - May 2026

3 participants