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

Method v1ProjectNameToID

api/queries_repo.go:855–863  ·  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

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

Callers 1

ProjectsTitlesToIDsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected