(opts *ConvertOptions)
| 160 | } |
| 161 | |
| 162 | func 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 | |
| 183 | func (co *ConvertOptions) Commit() error { |
| 184 | co.GitBranch.Value = check(co.GitBranch.Value, DefaultBranch) |
no test coverage detected