MCPcopy Create free account
hub / github.com/github/gh-aw / validateActionModeConfig

Function validateActionModeConfig

pkg/cli/compile_validation.go:224–237  ·  view source on GitHub ↗

validateActionModeConfig validates the action mode configuration

(actionMode string)

Source from the content-addressed store, hash-verified

222
223// validateActionModeConfig validates the action mode configuration
224func validateActionModeConfig(actionMode string) error {
225 if actionMode == "" {
226 return nil
227 }
228
229 mode := workflow.ActionMode(actionMode)
230 if !mode.IsValid() {
231 // ActionModeScript is intentionally excluded from this user-facing error:
232 // it remains internal and is not advertised as a CLI-supported mode.
233 return fmt.Errorf("invalid action mode '%s'. Must be 'dev', 'release', or 'action'", actionMode)
234 }
235
236 return nil
237}
238
239// sanitizeValidationResults creates a sanitized copy of validation results with all
240// error and warning messages sanitized to remove potential secret key names.

Callers 1

CompileWorkflowsFunction · 0.85

Calls 3

ActionModeTypeAlias · 0.92
IsValidMethod · 0.45
ErrorfMethod · 0.45

Tested by

no test coverage detected