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

Method v1ProjectNameToID

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

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

Callers 1

ProjectsTitlesToIDsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected