diff options
Diffstat (limited to 'models/branches.go')
-rw-r--r-- | models/branches.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/models/branches.go b/models/branches.go index d488fc9fcc..44cfb41403 100644 --- a/models/branches.go +++ b/models/branches.go @@ -177,12 +177,13 @@ func (protectBranch *ProtectedBranch) GetGrantedApprovalsCount(pr *PullRequest) } // MergeBlockedByRejectedReview returns true if merge is blocked by rejected reviews +// An official ReviewRequest should also block Merge like Reject func (protectBranch *ProtectedBranch) MergeBlockedByRejectedReview(pr *PullRequest) bool { if !protectBranch.BlockOnRejectedReviews { return false } rejectExist, err := x.Where("issue_id = ?", pr.IssueID). - And("type = ?", ReviewTypeReject). + And("type in ( ?, ?)", ReviewTypeReject, ReviewTypeRequest). And("official = ?", true). Exist(new(Review)) if err != nil { |