Fix duplicate success marker in gh aw fix --write output#37688
Merged
Conversation
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
Fix duplicate success marker in Jun 8, 2026
gh aw fix --write outputgh aw fix --write output
Copilot created this pull request from a session on behalf of
pelikhan
June 8, 2026 00:42
View session
Contributor
There was a problem hiding this comment.
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
processWorkflowFileWithInfoto pass only the filename toconsole.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
| } | ||
|
|
||
| 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") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gh aw fix --writeprinted 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
processWorkflowFileWithInfoinpkg/cli/fix_command.goto pass only the filename toconsole.FormatSuccessMessage, removing the redundant inline✓prefix from the call site.✓ <file>instead of✓ ✓ <file>.Regression coverage
TestProcessWorkflowFileWithInfo_WriteOutputUsesSingleCheckmarkinpkg/cli/fix_command_test.go.stderrfor a write-path codemod application and asserts: