MCPcopy Create free account
hub / github.com/cli/cli / v1ProjectNameToID

Method v1ProjectNameToID

api/queries_repo.go:852–860  ·  view source on GitHub ↗

We use the word "titles" when referring to v1 and v2 projects. In reality, v1 projects really have "names", so there is a bit of a mismatch we just need to gloss over.

(name string)

Source from the content-addressed store, hash-verified

850// In reality, v1 projects really have "names", so there is a bit of a
851// mismatch we just need to gloss over.
852func (m *RepoMetadataResult) v1ProjectNameToID(name string) (string, bool) {
853 for _, p := range m.Projects {
854 if strings.EqualFold(name, p.Name) {
855 return p.ID, true
856 }
857 }
858
859 return "", false
860}
861
862func (m *RepoMetadataResult) v2ProjectTitleToID(title string) (string, bool) {
863 for _, p := range m.ProjectsV2 {

Callers 1

ProjectsTitlesToIDsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected