From ce62fd854b145184af8a5276dcb5d79a136a9508 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Jul 2026 14:32:54 +0000 Subject: [PATCH 1/3] Initial plan From 70cab09e7d75d5604974d4dd466ff1d2da260a5e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Jul 2026 14:49:55 +0000 Subject: [PATCH 2/3] fix: CLI consistency issues - dir flag descriptions, yes flag verbs, add-wizard docs - Fix --yes flag: update_command uses 'update', upgrade_command uses 'upgrade' - Fix --dir flag: add $GH_AW_WORKFLOWS_DIR to descriptions in compile, remove (main.go), validate, fix, add, add-wizard, deploy, update, upgrade commands - Update add-wizard docs to include --append and --no-security-scanner options" Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- cmd/gh-aw/main.go | 4 ++-- docs/src/content/docs/setup/cli.md | 2 +- pkg/cli/add_command.go | 2 +- pkg/cli/add_wizard_command.go | 2 +- pkg/cli/deploy_command.go | 2 +- pkg/cli/fix_command.go | 2 +- pkg/cli/update_command.go | 4 ++-- pkg/cli/upgrade_command.go | 4 ++-- pkg/cli/validate_command.go | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cmd/gh-aw/main.go b/cmd/gh-aw/main.go index 064c8782c90..67c6ec30d08 100644 --- a/cmd/gh-aw/main.go +++ b/cmd/gh-aw/main.go @@ -721,7 +721,7 @@ Use "` + string(constants.CLIExtensionPrefix) + ` help all" to show help for all compileCmd.Flags().String("gh-aw-ref", "", "Pin compiled workflows to a specific branch, tag, or commit SHA of github/gh-aw (e.g. main, my-feature, abc123). Branch and tag names are resolved to their full commit SHA at compile time so the baked-in ref is immutable. Equivalent to --action-mode release --action-tag . Cannot be combined with --action-tag or --action-mode. Use this to E2E-test workflows against a specific gh-aw revision") compileCmd.Flags().Bool("validate", false, "Enable GitHub Actions workflow schema validation, container image validation, and action SHA validation") compileCmd.Flags().BoolP("watch", "w", false, "Watch for changes to workflow files and recompile automatically") - compileCmd.Flags().StringP("dir", "d", "", "Workflow directory (default: .github/workflows)") + compileCmd.Flags().StringP("dir", "d", "", "Workflow directory (default: $GH_AW_WORKFLOWS_DIR or .github/workflows)") compileCmd.Flags().String("workflows-dir", "", "Deprecated: use --dir instead") _ = compileCmd.Flags().MarkDeprecated("workflows-dir", "use --dir instead") compileCmd.Flags().Bool("no-emit", false, "Validate workflow without generating lock files") @@ -772,7 +772,7 @@ Use "` + string(constants.CLIExtensionPrefix) + ` help all" to show help for all // Add flags to remove command removeCmd.Flags().Bool("keep-orphans", false, "Skip removal of orphaned include files that are no longer referenced by any workflow") - removeCmd.Flags().StringP("dir", "d", "", "Workflow directory (default: .github/workflows)") + removeCmd.Flags().StringP("dir", "d", "", "Workflow directory (default: $GH_AW_WORKFLOWS_DIR or .github/workflows)") // Register completions for remove command removeCmd.ValidArgsFunction = cli.CompleteWorkflowNames cli.RegisterDirFlagCompletion(removeCmd, "dir") diff --git a/docs/src/content/docs/setup/cli.md b/docs/src/content/docs/setup/cli.md index f76645d7875..a0d5c4a35ea 100644 --- a/docs/src/content/docs/setup/cli.md +++ b/docs/src/content/docs/setup/cli.md @@ -166,7 +166,7 @@ gh aw add-wizard https://example.com/workflows/my-workflow.json # Arbitrary UR gh aw add-wizard githubnext/agentics/ci-doctor --no-secret # Skip secret prompt ``` -**Options:** `--no-secret`, `--dir/-d`, `--engine/-e`, `--no-gitattributes`, `--no-stop-after`, `--stop-after` +**Options:** `--no-secret`, `--dir/-d`, `--engine/-e`, `--no-gitattributes`, `--no-stop-after`, `--stop-after`, `--append`, `--no-security-scanner` When the Copilot engine is selected, the wizard prompts the user to choose an authentication method: organization billing via [`permissions.copilot-requests: write`](/gh-aw/reference/auth/#copilot-requests-write-permission) (no PAT required), or a [`COPILOT_GITHUB_TOKEN`](/gh-aw/reference/auth/#copilot_github_token) personal access token. Selecting org billing injects the `copilot-requests: write` permission into the workflow frontmatter and skips the API key secret prompt. diff --git a/pkg/cli/add_command.go b/pkg/cli/add_command.go index a24de09699f..ef04ff1749c 100644 --- a/pkg/cli/add_command.go +++ b/pkg/cli/add_command.go @@ -185,7 +185,7 @@ func registerAddCommandFlags(cmd *cobra.Command) { cmd.Flags().Bool("no-gitattributes", false, "Skip updating .gitattributes file") // Add workflow directory flag to add command - cmd.Flags().StringP("dir", "d", "", "Workflow directory (default: .github/workflows)") + cmd.Flags().StringP("dir", "d", "", "Workflow directory (default: $GH_AW_WORKFLOWS_DIR or .github/workflows)") // Add no-stop-after flag to add command cmd.Flags().Bool("no-stop-after", false, "Remove any stop-after field from the workflow") diff --git a/pkg/cli/add_wizard_command.go b/pkg/cli/add_wizard_command.go index 07fc827cce6..5641d3162f4 100644 --- a/pkg/cli/add_wizard_command.go +++ b/pkg/cli/add_wizard_command.go @@ -112,7 +112,7 @@ Note: To create a new workflow from scratch, use the 'new' command instead.`, cmd.Flags().Bool("no-gitattributes", false, "Skip updating .gitattributes file") // Add workflow directory flag - cmd.Flags().StringP("dir", "d", "", "Workflow directory (default: .github/workflows)") + cmd.Flags().StringP("dir", "d", "", "Workflow directory (default: $GH_AW_WORKFLOWS_DIR or .github/workflows)") // Add no-stop-after flag cmd.Flags().Bool("no-stop-after", false, "Remove any stop-after field from the workflow") diff --git a/pkg/cli/deploy_command.go b/pkg/cli/deploy_command.go index 03615e98ccc..ba97fefbf71 100644 --- a/pkg/cli/deploy_command.go +++ b/pkg/cli/deploy_command.go @@ -96,7 +96,7 @@ func registerDeployFlags(cmd *cobra.Command) { cmd.Flags().BoolP("force", "f", false, "Overwrite existing workflow files without confirmation") cmd.Flags().String("append", "", "Append extra content to the end of agentic workflow on installation") cmd.Flags().Bool("no-gitattributes", false, "Skip updating .gitattributes file") - cmd.Flags().StringP("dir", "d", "", "Workflow directory (default: .github/workflows)") + cmd.Flags().StringP("dir", "d", "", "Workflow directory (default: $GH_AW_WORKFLOWS_DIR or .github/workflows)") cmd.Flags().Bool("no-stop-after", false, "Remove any stop-after field from the workflow") cmd.Flags().String("stop-after", "", "Override stop-after value in the workflow (e.g., '+48h', '2025-12-31 23:59:59')") cmd.Flags().Bool("no-security-scanner", false, "Disable security scanning of workflow markdown content") diff --git a/pkg/cli/fix_command.go b/pkg/cli/fix_command.go index e6108ae6fca..bc639a7303a 100644 --- a/pkg/cli/fix_command.go +++ b/pkg/cli/fix_command.go @@ -82,7 +82,7 @@ all steps and additionally: cmd.Flags().Bool("write", false, "Write changes to files (without this flag, no changes are made)") cmd.Flags().Bool("list-codemods", false, "List all available codemods and exit") - cmd.Flags().StringP("dir", "d", "", "Workflow directory (default: .github/workflows)") + cmd.Flags().StringP("dir", "d", "", "Workflow directory (default: $GH_AW_WORKFLOWS_DIR or .github/workflows)") cmd.Flags().StringSlice("disable-codemod", nil, "Disable specific codemod IDs during the fix step (repeatable)") // Register completions diff --git a/pkg/cli/update_command.go b/pkg/cli/update_command.go index 992d93fdceb..60248b0337a 100644 --- a/pkg/cli/update_command.go +++ b/pkg/cli/update_command.go @@ -163,7 +163,7 @@ Note: In GitHub Enterprise repos, shorthand source specs resolve on your enterpr cmd.Flags().Bool("major", false, "Allow major version updates when updating tagged releases") cmd.Flags().BoolP("force", "f", false, "Force update even if no changes are detected") addEngineFlag(cmd) - cmd.Flags().StringP("dir", "d", "", "Workflow directory (default: .github/workflows)") + cmd.Flags().StringP("dir", "d", "", "Workflow directory (default: $GH_AW_WORKFLOWS_DIR or .github/workflows)") cmd.Flags().Bool("no-stop-after", false, "Remove any stop-after field from the workflow") cmd.Flags().String("stop-after", "", "Override stop-after value in the workflow (e.g., '+48h', '2025-12-31 23:59:59')") cmd.Flags().Bool("no-merge", false, "Override local changes with upstream version instead of merging") @@ -181,7 +181,7 @@ Note: In GitHub Enterprise repos, shorthand source specs resolve on your enterpr cmd.Flags().Bool("create-pull-request", false, "Create a pull request with the update changes") cmd.Flags().Bool("pr", false, "Alias for --create-pull-request") cmd.Flags().Bool("create-issue", false, "Open a GitHub issue in each org repository that has pending workflow updates (requires --org)") - cmd.Flags().BoolP("yes", "y", false, "Auto-accept org-mode create confirmations (required in CI)") + cmd.Flags().BoolP("yes", "y", false, "Auto-accept org-mode update confirmations (required in CI)") cmd.Flags().String("cool-down", "7d", coolDownFlagUsage) _ = cmd.Flags().MarkHidden("pr") // Hide the short alias from help output diff --git a/pkg/cli/upgrade_command.go b/pkg/cli/upgrade_command.go index 5dfb6861bae..b18bc7d34aa 100644 --- a/pkg/cli/upgrade_command.go +++ b/pkg/cli/upgrade_command.go @@ -149,7 +149,7 @@ This command always upgrades all Markdown files in .github/workflows.`, }, } - cmd.Flags().StringP("dir", "d", "", "Workflow directory (default: .github/workflows)") + cmd.Flags().StringP("dir", "d", "", "Workflow directory (default: $GH_AW_WORKFLOWS_DIR or .github/workflows)") cmd.Flags().Bool("no-fix", false, "Skip codemods, action version updates, and workflow compilation (only update agent files)") cmd.Flags().Bool("no-actions", false, "Skip updating GitHub Actions versions (ignored when --no-fix is set)") cmd.Flags().Bool("no-compile", false, "Skip recompiling workflows (do not modify lock files; ignored when --no-fix is set)") @@ -158,7 +158,7 @@ This command always upgrades all Markdown files in .github/workflows.`, cmd.Flags().Bool("pr", false, "Alias for --create-pull-request") _ = cmd.Flags().MarkHidden("pr") // Hide the short alias from help output cmd.Flags().Bool("create-issue", false, "Open a GitHub issue in each org repository with agentic workflows (requires --org)") - cmd.Flags().BoolP("yes", "y", false, "Auto-accept org-mode create confirmations (required in CI)") + cmd.Flags().BoolP("yes", "y", false, "Auto-accept org-mode upgrade confirmations (required in CI)") cmd.Flags().Bool("audit", false, "Check dependency health without performing upgrades") cmd.Flags().Bool("pre-releases", false, "Include pre-release versions when checking for extension upgrades; pre-releases are installed by exact tag") cmd.Flags().Bool("approve", false, "Approve all safe update changes. When strict mode is active (the default), the compiler emits warnings for new restricted secrets or unapproved action additions/removals not present in the existing gh-aw-manifest. Use this flag to approve and skip safe update enforcement") diff --git a/pkg/cli/validate_command.go b/pkg/cli/validate_command.go index 412d340bf51..cb293bbce81 100644 --- a/pkg/cli/validate_command.go +++ b/pkg/cli/validate_command.go @@ -74,7 +74,7 @@ If no workflows are specified, all Markdown files in .github/workflows will be v } addEngineFlag(cmd) - cmd.Flags().StringP("dir", "d", "", "Workflow directory (default: .github/workflows)") + cmd.Flags().StringP("dir", "d", "", "Workflow directory (default: $GH_AW_WORKFLOWS_DIR or .github/workflows)") cmd.Flags().Bool("strict", false, "Override frontmatter to enforce strict mode validation for all workflows (enforces action pinning, network config, safe-outputs, disallows write permissions and deprecated fields). Note: Workflows default to strict mode unless frontmatter sets strict: false") cmd.Flags().BoolP("json", "j", false, "Output results in JSON format") cmd.Flags().Bool("fail-fast", false, "Stop at the first validation error instead of collecting all errors") From 984366993fcaa53b2f52065c3969e7ab35a1d86b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Jul 2026 20:08:29 +0000 Subject: [PATCH 3/3] docs: fix upgrade --yes help text in CLI docs Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com> --- docs/src/content/docs/setup/cli.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/content/docs/setup/cli.md b/docs/src/content/docs/setup/cli.md index a0d5c4a35ea..700d4208b74 100644 --- a/docs/src/content/docs/setup/cli.md +++ b/docs/src/content/docs/setup/cli.md @@ -720,7 +720,7 @@ gh aw upgrade --org my-org --create-issue --yes # Auto-accept per-repo confirma **Options:** `--dir/-d`, `--no-fix`, `--no-actions`, `--no-compile`, `--disable-codemod`, `--create-pull-request`, `--create-issue`, `--org`, `--repos`, `--yes/-y`, `--audit`, `--json/-j`, `--approve`, `--pre-releases` -Org mode (`--org`) previews or creates upgrade pull requests across every repository in an organization. Use `--repos` to limit org mode to repositories matching one or more glob patterns, `--create-issue` to open an issue in each org repository with agentic workflows (requires `--org`), and `--yes/-y` to auto-accept org-mode create confirmations (required in CI). +Org mode (`--org`) previews or creates upgrade pull requests across every repository in an organization. Use `--repos` to limit org mode to repositories matching one or more glob patterns, `--create-issue` to open an issue in each org repository with agentic workflows (requires `--org`), and `--yes/-y` to auto-accept org-mode upgrade confirmations (required in CI). Use `--disable-codemod` (repeatable) to skip specific codemod IDs during the embedded fix step. This flag is ignored when `--no-fix` is set.