From d8ad2f788191f5bd72f661cf22f46f0314388d36 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 15 Apr 2026 13:10:03 +0000 Subject: [PATCH 1/2] Initial plan From a5ed89aed7682e0aee24925bbb7f3af9381f3ea4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 15 Apr 2026 13:22:16 +0000 Subject: [PATCH 2/2] rename NewWorkflow to CreateWorkflowMarkdownFile in pkg/cli Agent-Logs-Url: https://github.com/github/gh-aw/sessions/de690d8b-e59d-4c19-8973-8cecbd0a79c0 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- cmd/gh-aw/main.go | 2 +- pkg/cli/README.md | 2 +- pkg/cli/commands.go | 4 ++-- pkg/cli/commands_test.go | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/gh-aw/main.go b/cmd/gh-aw/main.go index 0e3c4aa6e32..811ed7c1518 100644 --- a/cmd/gh-aw/main.go +++ b/cmd/gh-aw/main.go @@ -159,7 +159,7 @@ Examples: // Template mode with workflow name workflowName := args[0] - return cli.NewWorkflow(workflowName, verbose, forceFlag, engineOverride) + return cli.CreateWorkflowMarkdownFile(workflowName, verbose, forceFlag, engineOverride) }, } diff --git a/pkg/cli/README.md b/pkg/cli/README.md index e231916732f..4a4a87e692a 100644 --- a/pkg/cli/README.md +++ b/pkg/cli/README.md @@ -105,7 +105,7 @@ All diagnostic output MUST go to `stderr` using `console` formatting helpers. St | `RunFix` | `func(FixConfig) error` | Applies automatic codemods | | `GetAllCodemods` | `func() []Codemod` | Returns all available codemods | | `InitRepository` | `func(InitOptions) error` | Initializes a repo with the `gh-aw` setup | -| `NewWorkflow` | `func(string, bool, bool, string) error` | Creates a new workflow markdown file | +| `CreateWorkflowMarkdownFile` | `func(string, bool, bool, string) error` | Creates a new workflow markdown file | | `IsRunnable` | `func(string) (bool, error)` | Checks whether a workflow file is runnable | | `RunWorkflowInteractively` | `func(ctx, ...) error` | Interactive workflow selection and dispatch | | `AddMCPTool` | `func(string, string, ...) error` | Adds an MCP server to a workflow file | diff --git a/pkg/cli/commands.go b/pkg/cli/commands.go index 743368479fd..6f5c3c4c204 100644 --- a/pkg/cli/commands.go +++ b/pkg/cli/commands.go @@ -15,8 +15,8 @@ import ( var commandsLog = logger.New("cli:commands") -// NewWorkflow creates a new workflow markdown file with template content -func NewWorkflow(workflowName string, verbose bool, force bool, engine string) error { +// CreateWorkflowMarkdownFile creates a new workflow markdown file with template content +func CreateWorkflowMarkdownFile(workflowName string, verbose bool, force bool, engine string) error { commandsLog.Printf("Creating new workflow: name=%s, force=%v, engine=%s", workflowName, force, engine) // Normalize the workflow name by removing .md extension if present diff --git a/pkg/cli/commands_test.go b/pkg/cli/commands_test.go index 3e84f1c0656..aee4f586bb5 100644 --- a/pkg/cli/commands_test.go +++ b/pkg/cli/commands_test.go @@ -405,7 +405,7 @@ Test workflow for command existence.` } } -func TestNewWorkflow(t *testing.T) { +func TestCreateWorkflowMarkdownFile(t *testing.T) { // Create a temporary directory for testing tempDir, err := os.MkdirTemp("", "test-new-workflow-*") if err != nil { @@ -483,7 +483,7 @@ func TestNewWorkflow(t *testing.T) { } // Run the function - err := NewWorkflow(test.workflowName, false, test.force, "") + err := CreateWorkflowMarkdownFile(test.workflowName, false, test.force, "") // Check error expectation if test.expectedError && err == nil {