(opts *ConvertOptions)
| 334 | } |
| 335 | |
| 336 | func promptProjectGitCredentials(opts *ConvertOptions) error { |
| 337 | if opts.GitUsername.Value == "" { |
| 338 | if err := opts.Ask(&survey.Input{ |
| 339 | Message: "Git username", |
| 340 | Help: "The Git username.", |
| 341 | }, &opts.GitUsername.Value, survey.WithValidator(survey.ComposeValidators( |
| 342 | survey.MaxLength(200), |
| 343 | survey.Required, |
| 344 | ))); err != nil { |
| 345 | return err |
| 346 | } |
| 347 | } |
| 348 | |
| 349 | if opts.GitPassword.Value == "" { |
| 350 | if err := opts.Ask(&survey.Password{ |
| 351 | Message: "Git password", |
| 352 | Help: "The Git password.", |
| 353 | }, &opts.GitPassword.Value, survey.WithValidator(survey.ComposeValidators( |
| 354 | survey.MaxLength(200), |
| 355 | survey.Required, |
| 356 | ))); err != nil { |
| 357 | return err |
| 358 | } |
| 359 | } |
| 360 | return nil |
| 361 | } |
| 362 | |
| 363 | func promptLibraryGitCredentials(opts *ConvertOptions, gitCredentialsCallback GetAllGitCredentialsCallback) error { |
| 364 | if opts.GitCredentials.Value == "" { |
no test coverage detected