(octopus *octopusApiClient.Client, ask question.Asker, project *projects.Project)
| 700 | } |
| 701 | |
| 702 | func selectGitReference(octopus *octopusApiClient.Client, ask question.Asker, project *projects.Project) (*projects.GitReference, error) { |
| 703 | branches, err := octopus.Projects.GetGitBranches(project) |
| 704 | if err != nil { |
| 705 | return nil, err |
| 706 | } |
| 707 | |
| 708 | tags, err := octopus.Projects.GetGitTags(project) |
| 709 | |
| 710 | if err != nil { |
| 711 | return nil, err |
| 712 | } |
| 713 | |
| 714 | allRefs := append(branches, tags...) |
| 715 | |
| 716 | return question.SelectMap(ask, "Select the Git Reference to use", allRefs, func(g *projects.GitReference) string { |
| 717 | return fmt.Sprintf("%s %s", g.Name, output.Dimf("(%s)", g.Type.Description())) |
| 718 | }) |
| 719 | } |
no test coverage detected