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

Method ProjectsV1

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

Source from the content-addressed store, hash-verified

310)
311
312func (d *detector) ProjectsV1() gh.ProjectsV1Support {
313 if !ghauth.IsEnterprise(d.host) {
314 return gh.ProjectsV1Unsupported
315 }
316
317 hostVersion, hostVersionErr := resolveEnterpriseVersion(d.httpClient, d.host)
318 v1ProjectCutoffVersion, v1ProjectCutoffVersionErr := version.NewVersion(enterpriseProjectsV1Removed)
319
320 if hostVersionErr == nil && v1ProjectCutoffVersionErr == nil && hostVersion.LessThan(v1ProjectCutoffVersion) {
321 return gh.ProjectsV1Supported
322 }
323
324 return gh.ProjectsV1Unsupported
325}
326
327func (d *detector) ProjectFeatures() (ProjectFeatures, error) {
328 if !ghauth.IsEnterprise(d.host) {

Callers

nothing calls this directly

Calls 1

resolveEnterpriseVersionFunction · 0.85

Tested by

no test coverage detected