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 @@ -775,7 +775,7 @@ Use "` + string(constants.CLIExtensionPrefix) + ` help all" to show help for all
compileCmd.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")
compileCmd.Flags().Bool("validate-images", false, "Require Docker to be available for container image validation. Without this flag, container image validation is silently skipped when Docker is not installed or the daemon is not running")
compileCmd.Flags().String("prior-manifest-file", "", "Path to a JSON file containing pre-cached gh-aw-manifests (map[lockFile]*GHAWManifest); used by the MCP server to supply a tamper-proof manifest baseline captured at startup")
compileCmd.Flags().Bool("ghes", false, "Enable GitHub Enterprise Server (GHES) compatibility mode. Artifact actions continue using latest non-v3 pins (v3 is deprecated). Overrides the aw.json ghes field")
compileCmd.Flags().Bool("ghes", false, "Enable GitHub Enterprise Server (GHES) compatibility mode. Artifact actions continue using latest non-v3 pins (v3 is deprecated). Overrides the aw.json ghes field.")
if err := compileCmd.Flags().MarkHidden("prior-manifest-file"); err != nil {
// Non-fatal: flag is registered even if MarkHidden fails
_ = err
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/setup/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ gh aw secrets set MY_SECRET --value-from-env MY_TOKEN # From env var

##### `secrets bootstrap`

Analyze workflows to determine required secrets and interactively prompt for missing ones. Auto-detects engines in use and validates tokens before uploading to the repository.
Analyze workflows to determine required secrets and interactively prompt for missing ones. Auto-detects engines in use and checks which required secrets are already configured.

```bash wrap
gh aw secrets bootstrap # Analyze all workflows and prompt for missing secrets
Expand Down
9 changes: 7 additions & 2 deletions pkg/cli/secrets_command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func TestSecretsCommandStructure(t *testing.T) {
}
}

func TestSecretsBootstrapEngineFlagIncludesGemini(t *testing.T) {
func TestSecretsBootstrapEngineFlagUsage(t *testing.T) {
cmd := NewSecretsCommand()

var bootstrapCmd *cobra.Command
Expand All @@ -86,7 +86,12 @@ func TestSecretsBootstrapEngineFlagIncludesGemini(t *testing.T) {

engineFlag := bootstrapCmd.Flags().Lookup("engine")
require.NotNil(t, engineFlag, "--engine flag should exist on bootstrap")
assert.Contains(t, engineFlag.Usage, "gemini", "--engine help should include gemini engine")

// Assert the full shared engine list is present so future additions are detected.
expectedEngines := []string{"copilot", "claude", "codex", "gemini", "antigravity", "opencode", "pi"}
for _, engine := range expectedEngines {
assert.Contains(t, engineFlag.Usage, engine, "--engine help should include %s engine", engine)
}
}

func TestSecretsCommandUnknownSubcommandReturnsError(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/tokens_bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Only required secrets are prompted for. Optional secrets are not shown.`,
}

cmd.Flags().BoolVar(&nonInteractiveFlag, "non-interactive", false, "Check secrets without prompting (display-only mode)")
cmd.Flags().StringVarP(&engineFlag, "engine", "e", "", "Check tokens for specific engine (copilot, claude, codex, gemini)")
cmd.Flags().StringVarP(&engineFlag, "engine", "e", "", "Check tokens for specific engine ("+engineFlagHelpList+")")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in commit test: strengthen bootstrap --engine flag test to cover full engine list. Renamed TestSecretsBootstrapEngineFlagIncludesGeminiTestSecretsBootstrapEngineFlagUsage and asserts all 7 engines (copilot, claude, codex, gemini, antigravity, opencode, pi) so future engine list drift is caught.

addRepoFlag(cmd)

return cmd
Expand Down
Loading