()
| 310 | ) |
| 311 | |
| 312 | func (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 | |
| 327 | func (d *detector) ProjectFeatures() (ProjectFeatures, error) { |
| 328 | if !ghauth.IsEnterprise(d.host) { |
nothing calls this directly
no test coverage detected