From 7cc1fe1b4ced288623eb532ffda2495ebfb16c1f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 24 Mar 2026 15:36:35 +0000 Subject: [PATCH 1/2] Initial plan From 2facf548f9300ab4b0a848fa005e4d430f454aa3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 24 Mar 2026 16:05:08 +0000 Subject: [PATCH 2/2] fix: resolve all CLI consistency issues in help text Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/gh-aw/sessions/bf65efa5-cd43-467d-8234-3262d32d4014 --- cmd/gh-aw/main.go | 4 +--- pkg/cli/fix_command.go | 2 +- pkg/cli/list_workflows_command.go | 4 ++-- pkg/cli/trial_command.go | 10 +++++----- pkg/cli/upgrade_command.go | 2 +- 5 files changed, 10 insertions(+), 12 deletions(-) diff --git a/cmd/gh-aw/main.go b/cmd/gh-aw/main.go index 8a0f5d2541b..b348ec1607e 100644 --- a/cmd/gh-aw/main.go +++ b/cmd/gh-aw/main.go @@ -361,8 +361,6 @@ The workflows must have been added as actions and compiled. This command only works with workflows that have workflow_dispatch triggers. It executes 'gh workflow run ' to trigger each workflow on GitHub Actions. -By default, workflows are run on the current branch. Use --ref to specify a different branch or tag. - ` + cli.WorkflowIDExplanation + ` Examples: @@ -648,7 +646,7 @@ Use "` + string(constants.CLIExtensionPrefix) + ` help all" to show help for all compileCmd.Flags().StringP("engine", "e", "", "Override AI engine (claude, codex, copilot, custom)") compileCmd.Flags().String("action-mode", "", "Action script inlining mode (inline, dev, release). Auto-detected if not specified") compileCmd.Flags().String("action-tag", "", "Override action SHA or tag for actions/setup (overrides action-mode to release). Accepts full SHA or tag name") - compileCmd.Flags().String("actions-repo", "", "Override the external actions repository used in action mode (default: github/gh-aw-actions). Example: --actions-repo myorg/my-aw-actions") + compileCmd.Flags().String("actions-repo", "", "Override the external actions repository used in action mode (default: github/gh-aw-actions)") 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)") diff --git a/pkg/cli/fix_command.go b/pkg/cli/fix_command.go index 3ccc5ba12c5..3c5cfc0997d 100644 --- a/pkg/cli/fix_command.go +++ b/pkg/cli/fix_command.go @@ -77,7 +77,7 @@ Examples: }, } - cmd.Flags().Bool("write", false, "Write changes to files (default is dry-run)") + 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)") diff --git a/pkg/cli/list_workflows_command.go b/pkg/cli/list_workflows_command.go index c158564e643..97ddaebb2c6 100644 --- a/pkg/cli/list_workflows_command.go +++ b/pkg/cli/list_workflows_command.go @@ -71,8 +71,8 @@ Examples: addRepoFlag(cmd) addJSONFlag(cmd) cmd.Flags().String("label", "", "Filter workflows by label") - cmd.Flags().String("path", ".github/workflows", "Path to workflows directory in the repository") - cmd.Flags().StringP("dir", "d", "", "Workflow directory (default: .github/workflows)") + cmd.Flags().String("path", ".github/workflows", "Path to workflows directory in the remote repository (used with --repo)") + cmd.Flags().StringP("dir", "d", "", "Local workflow directory (overrides default .github/workflows; ignored when --repo is set)") // Register completions for list command cmd.ValidArgsFunction = CompleteWorkflowNames diff --git a/pkg/cli/trial_command.go b/pkg/cli/trial_command.go index 8d58f60bbb7..89d07db4e11 100644 --- a/pkg/cli/trial_command.go +++ b/pkg/cli/trial_command.go @@ -76,7 +76,7 @@ func NewTrialCommand(validateEngine func(string) error) *cobra.Command { This command creates a temporary private repository in your GitHub space, installs the specified workflow(s) from their source repositories, and runs them in "trial mode" to capture safe outputs without -making actual changes to the "simulated" host repository +making actual changes to the "simulated" host repository. Single workflow: ` + string(constants.CLIExtensionPrefix) + ` trial githubnext/agentics/weekly-research @@ -177,17 +177,17 @@ Trial results are saved both locally (in trials/ directory) and in the host repo } // Add flags - cmd.Flags().StringP("logical-repo", "l", "", "The repo we're simulating the execution for, as if the workflow was installed in that repo (defaults to current repository)") + cmd.Flags().StringP("logical-repo", "l", "", "Repository to simulate workflow execution against, as if the workflow was installed there (defaults to current repository)") cmd.Flags().String("clone-repo", "", "Alternative to --logical-repo: clone the contents of the specified repo into the host repo instead of using logical repository simulation") cmd.Flags().String("host-repo", "", "Custom host repository slug (defaults to '/gh-aw-trial'). Use '.' for current repository") cmd.Flags().String("repo", "", "Alias for --host-repo: the repository where workflows are installed and run (note: different semantics from --repo in other commands)") _ = cmd.Flags().MarkHidden("repo") // Hide alias to avoid semantic confusion with --repo in other commands - cmd.Flags().Bool("delete-host-repo-after", false, "Delete the host repository after completion (default: keep)") - cmd.Flags().Bool("force-delete-host-repo-before", false, "Force delete the host repository before creation, if it exists before creating it") + cmd.Flags().Bool("delete-host-repo-after", false, "Delete the host repository after completion (kept by default)") + cmd.Flags().Bool("force-delete-host-repo-before", false, "Force delete the host repository before creation if it already exists") cmd.Flags().BoolP("yes", "y", false, "Skip confirmation prompts") cmd.Flags().Bool("dry-run", false, "Show what would be done without making any changes") - cmd.Flags().Int("timeout", 30, "Execution timeout in minutes (default: 30)") + cmd.Flags().Int("timeout", 30, "Execution timeout in minutes") cmd.Flags().String("trigger-context", "", "Trigger context URL (e.g., GitHub issue URL) for issue-triggered workflows") cmd.Flags().Int("repeat", 0, "Number of additional times to run after the initial execution (e.g., --repeat 3 runs 4 times total)") cmd.Flags().Bool("auto-merge-prs", false, "Auto-merge any pull requests created during trial execution") diff --git a/pkg/cli/upgrade_command.go b/pkg/cli/upgrade_command.go index e701fdf9a40..186b0ad13b9 100644 --- a/pkg/cli/upgrade_command.go +++ b/pkg/cli/upgrade_command.go @@ -109,7 +109,7 @@ Examples: } cmd.Flags().StringP("dir", "d", "", "Workflow directory (default: .github/workflows)") - cmd.Flags().Bool("no-fix", false, "Skip applying codemods, action updates, and compiling workflows (only update agent files)") + cmd.Flags().Bool("no-fix", false, "Skip codemods, action updates, and workflow compilation (only update agent files)") cmd.Flags().Bool("no-actions", false, "Skip updating GitHub Actions versions") cmd.Flags().Bool("no-compile", false, "Skip recompiling workflows (do not modify lock files)") cmd.Flags().Bool("create-pull-request", false, "Create a pull request with the upgrade changes")