()
| 490 | } |
| 491 | |
| 492 | func (d *detector) ReleaseFeatures() (ReleaseFeatures, error) { |
| 493 | // TODO: immutableReleaseFullSupport |
| 494 | // Once all supported GHES versions fully support immutable releases, we can |
| 495 | // remove this function, of course, unless there will be other release-related |
| 496 | // features that are not available on all GH hosts. |
| 497 | |
| 498 | var releaseFeatureDetection struct { |
| 499 | Release struct { |
| 500 | Fields []struct { |
| 501 | Name string |
| 502 | } `graphql:"fields"` |
| 503 | } `graphql:"Release: __type(name: \"Release\")"` |
| 504 | } |
| 505 | |
| 506 | gql := api.NewClientFromHTTP(d.httpClient) |
| 507 | if err := gql.Query(d.host, "Release_fields", &releaseFeatureDetection, nil); err != nil { |
| 508 | return ReleaseFeatures{}, err |
| 509 | } |
| 510 | |
| 511 | for _, field := range releaseFeatureDetection.Release.Fields { |
| 512 | if field.Name == "immutable" { |
| 513 | return ReleaseFeatures{ |
| 514 | ImmutableReleases: true, |
| 515 | }, nil |
| 516 | } |
| 517 | } |
| 518 | |
| 519 | return ReleaseFeatures{}, nil |
| 520 | } |
| 521 | |
| 522 | const ( |
| 523 | enterpriseWorkflowDispatchRunDetailsSupport = "3.21.0" |
nothing calls this directly
no test coverage detected