Fix bug where branchProtectionRule doesn't exist in enterprise 2.22

This commit is contained in:
Sam Coe 2021-06-30 09:47:30 -07:00
parent 3cc4c40dcb
commit e5b099b1dd
No known key found for this signature in database
GPG key ID: 8E322C20F811D086

View file

@ -533,11 +533,14 @@ func pullRequestFragment(httpClient *http.Client, hostname string) (string, erro
fields := []string{
"number", "title", "state", "url", "isDraft", "isCrossRepository",
"requiresStrictStatusChecks", "headRefName", "headRepositoryOwner", "mergeStateStatus",
"headRefName", "headRepositoryOwner", "mergeStateStatus",
}
if prFeatures.HasStatusCheckRollup {
fields = append(fields, "statusCheckRollup")
}
if prFeatures.HasBranchProtectionRule {
fields = append(fields, "requiresStrictStatusChecks")
}
var reviewFields []string
if prFeatures.HasReviewDecision {