// Ask prompts for fields that are required but not passed in.
Ask prompts for fields that are required but not passed in.
// Ask prompts for fields that are required but not passed in .
func (o *initPipelineOpts) Ask() error {
	var err error
	if len(o.environments) == 0 {
		if err = o.selectEnvironments(); err != nil {
			return err
		}
	}
	if o.githubURL == "" {
		if err = o.selectGitHubURL(); err != nil {
			return err
		}
	}
	if o.githubOwner, o.githubRepo, err = o.parseOwnerRepoName(o.githubURL); err != nil {
		return err
	}
	if o.githubAccessToken == "" {
		if err = o.getGitHubAccessToken(); err != nil {
			return err
		}
	}
	if o.gitBranch == "" {
		o.gitBranch = masterBranch
	}
	return nil
}
func ( o * initPipelineOpts ) Ask ( ) error { var err error if len ( o . environments ) == 0 { if err = o . selectEnvironments ( ) ; err != nil { return err } } if o . githubURL == " " { if err = o . selectGitHubURL ( ) ; err != nil { return err } } if o . githubOwner , o . githubRepo , err = o . parseOwnerRepoName ( o . githubURL ) ; err != nil { return err } if o . githubAccessToken == " " { if err = o . getGitHubAccessToken ( ) ; err != nil { return err } } if o . gitBranch == " " { o . gitBranch = masterBranch } return nil }
Ask prompts for fields that are required but not passed in.
Ask prompts for fields that are required but not passed in .