()
| 333 | ) |
| 334 | |
| 335 | func (d *detector) ProjectsV1() gh.ProjectsV1Support { |
| 336 | if !ghauth.IsEnterprise(d.host) { |
| 337 | return gh.ProjectsV1Unsupported |
| 338 | } |
| 339 | |
| 340 | hostVersion, hostVersionErr := resolveEnterpriseVersion(d.httpClient, d.host) |
| 341 | v1ProjectCutoffVersion, v1ProjectCutoffVersionErr := version.NewVersion(enterpriseProjectsV1Removed) |
| 342 | |
| 343 | if hostVersionErr == nil && v1ProjectCutoffVersionErr == nil && hostVersion.LessThan(v1ProjectCutoffVersion) { |
| 344 | return gh.ProjectsV1Supported |
| 345 | } |
| 346 | |
| 347 | return gh.ProjectsV1Unsupported |
| 348 | } |
| 349 | |
| 350 | func (d *detector) ProjectFeatures() (ProjectFeatures, error) { |
| 351 | if !ghauth.IsEnterprise(d.host) { |
nothing calls this directly
no test coverage detected