Avoid setting status check rollups when user supplies fields

This commit is contained in:
William Martin 2023-05-23 16:53:16 +02:00
parent 04ecac9a6f
commit b73ad06f15

View file

@ -55,13 +55,6 @@ func pullRequestStatus(httpClient *http.Client, repo ghrepo.Interface, options r
fields.AddValues(options.Fields)
// these are always necessary to find the PR for the current branch
fields.AddValues([]string{"isCrossRepository", "headRepositoryOwner", "headRefName"})
if options.CheckRunAndStatusContextCountsSupported {
fields.Add("statusCheckRollupWithCountByState")
} else {
fields.Add("statusCheckRollup")
}
gr := api.PullRequestGraphQL(fields.ToSlice())
fragments = fmt.Sprintf("fragment pr on PullRequest{%s}fragment prWithReviews on PullRequest{...pr}", gr)
} else {