Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/github-remote-mcp-auth-test.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pkg/cli/file_tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"path/filepath"
"strings"

"github.com/githubnext/gh-aw/pkg/console"
"github.com/githubnext/gh-aw/pkg/logger"
)

Expand Down Expand Up @@ -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)))
}
}
}
Expand Down
7 changes: 4 additions & 3 deletions pkg/cli/run_workflow_tracking.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package cli
import (
"encoding/json"
"fmt"
"os"
"os/exec"
"time"

Expand Down Expand Up @@ -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
}
Expand All @@ -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
}
Expand All @@ -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)))
}
}

Expand Down