X Tutup
Skip to content

Commit e5b099b

Browse files
committed
Fix bug where branchProtectionRule doesn't exist in enterprise 2.22
1 parent 3cc4c40 commit e5b099b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

api/queries_pr.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,11 +533,14 @@ func pullRequestFragment(httpClient *http.Client, hostname string) (string, erro
533533

534534
fields := []string{
535535
"number", "title", "state", "url", "isDraft", "isCrossRepository",
536-
"requiresStrictStatusChecks", "headRefName", "headRepositoryOwner", "mergeStateStatus",
536+
"headRefName", "headRepositoryOwner", "mergeStateStatus",
537537
}
538538
if prFeatures.HasStatusCheckRollup {
539539
fields = append(fields, "statusCheckRollup")
540540
}
541+
if prFeatures.HasBranchProtectionRule {
542+
fields = append(fields, "requiresStrictStatusChecks")
543+
}
541544

542545
var reviewFields []string
543546
if prFeatures.HasReviewDecision {

0 commit comments

Comments
 (0)
X Tutup