From e12d98602c92d87aa01764a2d0716dca3c20253d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 24 Jan 2026 11:54:23 +0000 Subject: [PATCH 1/3] Initial plan From 4dee5ef247b681c9e634d987e60e8d8835c7ec6f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 24 Jan 2026 11:59:06 +0000 Subject: [PATCH 2/3] Initial plan: Standardize error messages to use console.FormatErrorMessage() Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/github-remote-mcp-auth-test.lock.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/github-remote-mcp-auth-test.lock.yml b/.github/workflows/github-remote-mcp-auth-test.lock.yml index e68e97abe73..66e01c53b97 100644 --- a/.github/workflows/github-remote-mcp-auth-test.lock.yml +++ b/.github/workflows/github-remote-mcp-auth-test.lock.yml @@ -396,6 +396,11 @@ jobs: "X-MCP-Readonly": "true", "X-MCP-Toolsets": "repos,issues,discussions" }, + "tools": [ + "get_repository", + "list_issues", + "issue_read" + ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "\${GITHUB_MCP_SERVER_TOKEN}" } From 96e5eaa32cb116d98ca55b50e2c40a1ccf41dd9f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 24 Jan 2026 12:03:59 +0000 Subject: [PATCH 3/3] Standardize error messages to use console.FormatErrorMessage() Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- pkg/cli/file_tracker.go | 3 ++- pkg/cli/run_workflow_tracking.go | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pkg/cli/file_tracker.go b/pkg/cli/file_tracker.go index aa8de2899f6..41c89d3cd87 100644 --- a/pkg/cli/file_tracker.go +++ b/pkg/cli/file_tracker.go @@ -7,6 +7,7 @@ import ( "path/filepath" "strings" + "github.com/githubnext/gh-aw/pkg/console" "github.com/githubnext/gh-aw/pkg/logger" ) @@ -161,7 +162,7 @@ func (ft *FileTracker) RollbackModifiedFiles(verbose bool) error { } } else { if verbose { - fmt.Printf(" Warning: No original content stored for %s\n", file) + fmt.Fprintln(os.Stderr, console.FormatWarningMessage(fmt.Sprintf("No original content stored for %s", file))) } } } diff --git a/pkg/cli/run_workflow_tracking.go b/pkg/cli/run_workflow_tracking.go index 78bebcedda6..f16065b8476 100644 --- a/pkg/cli/run_workflow_tracking.go +++ b/pkg/cli/run_workflow_tracking.go @@ -3,6 +3,7 @@ package cli import ( "encoding/json" "fmt" + "os" "os/exec" "time" @@ -83,7 +84,7 @@ func getLatestWorkflowRunWithRetry(lockFileName string, repo string, verbose boo if err != nil { lastErr = fmt.Errorf("failed to get workflow runs: %w", err) if verbose { - fmt.Printf("Attempt %d/%d failed: %v\n", attempt+1, maxRetries, err) + fmt.Fprintln(os.Stderr, console.FormatErrorMessage(fmt.Sprintf("Attempt %d/%d failed: %v", attempt+1, maxRetries, err))) } continue } @@ -108,7 +109,7 @@ func getLatestWorkflowRunWithRetry(lockFileName string, repo string, verbose boo if err := json.Unmarshal(output, &runs); err != nil { lastErr = fmt.Errorf("failed to parse workflow run data: %w", err) if verbose { - fmt.Printf("Attempt %d/%d failed to parse JSON: %v\n", attempt+1, maxRetries, err) + fmt.Fprintln(os.Stderr, console.FormatErrorMessage(fmt.Sprintf("Attempt %d/%d failed to parse JSON: %v", attempt+1, maxRetries, err))) } continue } @@ -129,7 +130,7 @@ func getLatestWorkflowRunWithRetry(lockFileName string, repo string, verbose boo if parsedTime, err := time.Parse(time.RFC3339, run.CreatedAt); err == nil { createdAt = parsedTime } else if verbose { - fmt.Printf("Warning: Could not parse creation time '%s': %v\n", run.CreatedAt, err) + fmt.Fprintln(os.Stderr, console.FormatWarningMessage(fmt.Sprintf("Could not parse creation time '%s': %v", run.CreatedAt, err))) } }