validateActionModeConfig validates the action mode configuration
(actionMode string)
| 222 | |
| 223 | // validateActionModeConfig validates the action mode configuration |
| 224 | func 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. |
no test coverage detected