()
| 529 | } |
| 530 | |
| 531 | func (d *detector) ReleaseFeatures() (ReleaseFeatures, error) { |
| 532 | // TODO: immutableReleaseFullSupport |
| 533 | // Once all supported GHES versions fully support immutable releases, we can |
| 534 | // remove this function, of course, unless there will be other release-related |
| 535 | // features that are not available on all GH hosts. |
| 536 | |
| 537 | var releaseFeatureDetection struct { |
| 538 | Release struct { |
| 539 | Fields []struct { |
| 540 | Name string |
| 541 | } `graphql:"fields"` |
| 542 | } `graphql:"Release: __type(name: \"Release\")"` |
| 543 | } |
| 544 | |
| 545 | gql := api.NewClientFromHTTP(d.client()) |
| 546 | if err := gql.Query(d.host, "Release_fields", &releaseFeatureDetection, nil); err != nil { |
| 547 | return ReleaseFeatures{}, err |
| 548 | } |
| 549 | |
| 550 | for _, field := range releaseFeatureDetection.Release.Fields { |
| 551 | if field.Name == "immutable" { |
| 552 | return ReleaseFeatures{ |
| 553 | ImmutableReleases: true, |
| 554 | }, nil |
| 555 | } |
| 556 | } |
| 557 | |
| 558 | return ReleaseFeatures{}, nil |
| 559 | } |
| 560 | |
| 561 | const ( |
| 562 | enterpriseWorkflowDispatchRunDetailsSupport = "3.21.0" |
nothing calls this directly
no test coverage detected