MCPcopy Create free account
hub / github.com/Scalingo/cli / askForConfirmationToAllowReviewAppsFromForks

Function askForConfirmationToAllowReviewAppsFromForks

cmd/integration_link.go:568–585  ·  view source on GitHub ↗
(ctx context.Context, prompt string)

Source from the content-addressed store, hash-verified

566}
567
568func askForConfirmationToAllowReviewAppsFromForks(ctx context.Context, prompt string) (bool, error) {
569 fmt.Println()
570 io.Warning(reviewAppsFromForksSecurityWarning)
571 fmt.Println()
572
573 var confirmed bool
574
575 err := survey.AskOne(&survey.Confirm{
576 Message: prompt,
577 Default: false,
578 }, &confirmed, nil)
579
580 if err != nil {
581 return false, errors.Wrap(ctx, err, "fail to confirm review apps from forks")
582 }
583
584 return confirmed, nil
585}

Callers 2

interactiveCreateFunction · 0.85

Calls 1

WarningFunction · 0.92

Tested by

no test coverage detected