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

Method ProjectsV1

internal/featuredetection/feature_detection.go:374–387  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

372)
373
374func (d *detector) ProjectsV1() gh.ProjectsV1Support {
375 if !ghauth.IsEnterprise(d.host) {
376 return gh.ProjectsV1Unsupported
377 }
378
379 hostVersion, hostVersionErr := resolveEnterpriseVersion(d.client(), d.host)
380 v1ProjectCutoffVersion, v1ProjectCutoffVersionErr := version.NewVersion(enterpriseProjectsV1Removed)
381
382 if hostVersionErr == nil && v1ProjectCutoffVersionErr == nil && hostVersion.LessThan(v1ProjectCutoffVersion) {
383 return gh.ProjectsV1Supported
384 }
385
386 return gh.ProjectsV1Unsupported
387}
388
389func (d *detector) ProjectFeatures() (ProjectFeatures, error) {
390 if !ghauth.IsEnterprise(d.host) {

Callers

nothing calls this directly

Calls 2

clientMethod · 0.95
resolveEnterpriseVersionFunction · 0.85

Tested by

no test coverage detected