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
2 changes: 1 addition & 1 deletion cmd/gh-aw/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
},
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
4 changes: 2 additions & 2 deletions pkg/cli/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions pkg/cli/commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
Loading