Fix fetching information about the PR potentially being behind base branch
This commit is contained in:
parent
885e94786a
commit
a4d1ce7709
2 changed files with 3 additions and 1 deletions
|
|
@ -533,7 +533,7 @@ func pullRequestFragment(httpClient *http.Client, hostname string) (string, erro
|
|||
|
||||
fields := []string{
|
||||
"number", "title", "state", "url", "isDraft", "isCrossRepository",
|
||||
"headRefName", "headRepositoryOwner", "mergeStateStatus",
|
||||
"requiresStrictStatusChecks", "headRefName", "headRepositoryOwner", "mergeStateStatus",
|
||||
}
|
||||
if prFeatures.HasStatusCheckRollup {
|
||||
fields = append(fields, "statusCheckRollup")
|
||||
|
|
|
|||
|
|
@ -216,6 +216,8 @@ func PullRequestGraphQL(fields []string) string {
|
|||
q = append(q, `commits(last:1){nodes{commit{oid}}}`)
|
||||
case "commitsCount": // pseudo-field
|
||||
q = append(q, `commits{totalCount}`)
|
||||
case "requiresStrictStatusChecks": // pseudo-field
|
||||
q = append(q, `baseRef{branchProtectionRule{requiresStrictStatusChecks}}`)
|
||||
case "statusCheckRollup":
|
||||
q = append(q, StatusCheckRollupGraphQL(""))
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue