Skip to content

Fix duplicate success marker in gh aw fix --write output#37688

Merged
pelikhan merged 3 commits into
mainfrom
copilot/fix-double-checkmark-output
Jun 8, 2026
Merged

Fix duplicate success marker in gh aw fix --write output#37688
pelikhan merged 3 commits into
mainfrom
copilot/fix-double-checkmark-output

Conversation

Copilot AI commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

gh aw fix --write printed per-file success lines with a duplicated checkmark (✓ ✓ file.md), which reduced output readability during bulk codemod runs. This change normalizes the success line to a single marker while preserving existing fix detail output.

  • Output formatting correction

    • Updated processWorkflowFileWithInfo in pkg/cli/fix_command.go to pass only the filename to console.FormatSuccessMessage, removing the redundant inline prefix from the call site.
    • Resulting output now renders as ✓ <file> instead of ✓ ✓ <file>.
  • Regression coverage

    • Added TestProcessWorkflowFileWithInfo_WriteOutputUsesSingleCheckmark in pkg/cli/fix_command_test.go.
    • The test captures stderr for a write-path codemod application and asserts:
      • expected single-checkmark line is present
      • duplicate-checkmark variant is absent
// before
fmt.Fprintf(os.Stderr, "%s\n", console.FormatSuccessMessage("✓ "+fileName))

// after
fmt.Fprintf(os.Stderr, "%s\n", console.FormatSuccessMessage(fileName))

Copilot AI and others added 2 commits June 8, 2026 00:37
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 Fix duplicate checkmark in gh aw fix --write output Fix duplicate success marker in gh aw fix --write output Jun 8, 2026
Copilot AI requested a review from pelikhan June 8, 2026 00:42
@pelikhan pelikhan marked this pull request as ready for review June 8, 2026 00:43
Copilot AI review requested due to automatic review settings June 8, 2026 00:43
@pelikhan pelikhan merged commit f8ede81 into main Jun 8, 2026
@pelikhan pelikhan deleted the copilot/fix-double-checkmark-output branch June 8, 2026 00:43

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

This PR improves gh aw fix --write console output readability by eliminating a duplicated success marker in per-file success lines, and adds a regression test to prevent the duplication from reappearing.

Changes:

  • Updated processWorkflowFileWithInfo to pass only the filename to console.FormatSuccessMessage, avoiding ✓ ✓ <file> output.
  • Added a regression test covering the write-path output formatting.
Show a summary per file
File Description
pkg/cli/fix_command.go Removes redundant inline prefix for per-file success output (but the non-write warning path still has a duplicated marker).
pkg/cli/fix_command_test.go Adds a regression test for single-checkmark output (assertions need to be robust to ANSI styling/TTY behavior).

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: 2

Comment thread pkg/cli/fix_command.go
}

fmt.Fprintf(os.Stderr, "%s\n", console.FormatSuccessMessage("✓ "+fileName))
fmt.Fprintf(os.Stderr, "%s\n", console.FormatSuccessMessage(fileName))
Comment on lines +55 to +56
assert.Contains(t, output, "✓ test-workflow.md")
assert.NotContains(t, output, "✓ ✓ test-workflow.md")
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