Fix bug where branchProtectionRule doesn't exist in enterprise 2.22
This commit is contained in:
parent
3cc4c40dcb
commit
e5b099b1dd
1 changed files with 4 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue