@@ -63,7 +63,7 @@ Examples:
6363 ` + string (constants .CLIExtensionPrefix ) + ` add githubnext/agentics/ci-doctor --create-pull-request --force
6464 ` + string (constants .CLIExtensionPrefix ) + ` add ./my-workflow.md # Add local workflow
6565 ` + string (constants .CLIExtensionPrefix ) + ` add ./*.md # Add all local workflows
66- ` + string (constants .CLIExtensionPrefix ) + ` add githubnext/agentics/ci-doctor --dir shared # Add to .github/workflows/shared/
66+ ` + string (constants .CLIExtensionPrefix ) + ` add githubnext/agentics/ci-doctor --dir .github/workflows/ shared # Add to .github/workflows/shared/
6767
6868Workflow specifications:
6969 - Three parts: "owner/repo/workflow-name[@version]" (implicitly looks in workflows/ directory)
@@ -74,7 +74,7 @@ Workflow specifications:
7474 - Version can be tag, branch, or SHA (for remote workflows)
7575
7676The -n flag allows you to specify a custom name for the workflow file (only applies to the first workflow when adding multiple).
77- The --dir flag allows you to specify a subdirectory under .github/workflows/ where the workflow will be added .
77+ The --dir flag allows you to specify the workflow directory (default: .github/workflows) .
7878The --create-pull-request flag creates a pull request with the workflow changes.
7979The --force flag overwrites existing workflow files.
8080
@@ -151,7 +151,7 @@ Note: For guided interactive setup, use the 'add-wizard' command instead.`,
151151 cmd .Flags ().Bool ("no-gitattributes" , false , "Skip updating .gitattributes file" )
152152
153153 // Add workflow directory flag to add command
154- cmd .Flags ().StringP ("dir" , "d" , "" , "Subdirectory under .github/workflows/ (e.g., 'shared' creates .github/workflows/shared/ )" )
154+ cmd .Flags ().StringP ("dir" , "d" , "" , "Workflow directory (default: .github/workflows)" )
155155
156156 // Add no-stop-after flag to add command
157157 cmd .Flags ().Bool ("no-stop-after" , false , "Remove any stop-after field from the workflow" )
@@ -328,11 +328,7 @@ func addWorkflowWithTracking(resolved *ResolvedWorkflow, tracker *FileTracker, o
328328 return fmt .Errorf ("workflow directory must be a relative path, got: %s" , opts .WorkflowDir )
329329 }
330330 opts .WorkflowDir = filepath .Clean (opts .WorkflowDir )
331- if ! strings .HasPrefix (opts .WorkflowDir , ".github/workflows" ) {
332- githubWorkflowsDir = filepath .Join (gitRoot , ".github/workflows" , opts .WorkflowDir )
333- } else {
334- githubWorkflowsDir = filepath .Join (gitRoot , opts .WorkflowDir )
335- }
331+ githubWorkflowsDir = filepath .Join (gitRoot , opts .WorkflowDir )
336332 } else {
337333 githubWorkflowsDir = filepath .Join (gitRoot , ".github/workflows" )
338334 }
0 commit comments