promptForSecret prompts the user to provide a secret value
(req SecretRequirement, config EngineSecretConfig)
| 275 | |
| 276 | // promptForSecret prompts the user to provide a secret value |
| 277 | func promptForSecret(req SecretRequirement, config EngineSecretConfig) error { |
| 278 | engineSecretsLog.Printf("Prompting for secret: %s", req.Name) |
| 279 | |
| 280 | // Copilot requires special handling with PAT creation instructions |
| 281 | if req.IsEngineSecret && req.EngineName == string(constants.CopilotEngine) { |
| 282 | return promptForCopilotPATUnified(req, config) |
| 283 | } |
| 284 | |
| 285 | // System secrets (GH_AW_*) require PAT-specific prompting, not API key wording |
| 286 | if !req.IsEngineSecret { |
| 287 | return promptForSystemTokenUnified(req, config) |
| 288 | } |
| 289 | |
| 290 | return promptForGenericAPIKeyUnified(req, config) |
| 291 | } |
| 292 | |
| 293 | // promptForCopilotPATUnified prompts the user for a Copilot PAT with detailed instructions |
| 294 | func promptForCopilotPATUnified(req SecretRequirement, config EngineSecretConfig) error { |
no test coverage detected