MCPcopy Create free account
hub / github.com/OctopusDeploy/cli / PromptMissing

Function PromptMissing

pkg/cmd/project/convert/convert.go:162–181  ·  view source on GitHub ↗
(opts *ConvertOptions)

Source from the content-addressed store, hash-verified

160}
161
162func PromptMissing(opts *ConvertOptions) error {
163 if opts.Project.Value == "" {
164 allProjects, err := opts.GetAllProjectsCallback()
165 if err != nil {
166 return err
167 }
168 project, err := question.SelectMap(opts.Ask, "You have not specified a project. Please select one:", allProjects, func(p *projects.Project) string { return p.GetName() })
169 if err != nil {
170 return err
171 }
172 opts.Project.Value = project.GetName()
173 }
174
175 _, err := PromptForConfigAsCode(opts)
176 if err != nil {
177 return err
178 }
179
180 return nil
181}
182
183func (co *ConvertOptions) Commit() error {
184 co.GitBranch.Value = check(co.GitBranch.Value, DefaultBranch)

Callers 1

convertRunFunction · 0.70

Calls 3

SelectMapFunction · 0.92
PromptForConfigAsCodeFunction · 0.70
GetNameMethod · 0.65

Tested by

no test coverage detected