summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authora1012112796 <1012112796@qq.com>2020-11-29 03:30:46 +0800
committerGitHub <noreply@github.com>2020-11-28 21:30:46 +0200
commit9c26dc1f3a742280baff4e9578545bc822016764 (patch)
treeac997d23e59a658b387302ecd65e76a39d99b9e8 /services
parent7ed5bf8cbe06bf2cfc4980cf6e020dc46dd71a79 (diff)
downloadgitea-9c26dc1f3a742280baff4e9578545bc822016764.tar.gz
gitea-9c26dc1f3a742280baff4e9578545bc822016764.zip
Add block on official review requests branch protection (#13705)
Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'services')
-rw-r--r--services/pull/merge.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/services/pull/merge.go b/services/pull/merge.go
index 8e51583e91..3d856724cd 100644
--- a/services/pull/merge.go
+++ b/services/pull/merge.go
@@ -591,6 +591,11 @@ func CheckPRReadyToMerge(pr *models.PullRequest, skipProtectedFilesCheck bool) (
Reason: "There are requested changes",
}
}
+ if pr.ProtectedBranch.MergeBlockedByOfficialReviewRequests(pr) {
+ return models.ErrNotAllowedToMerge{
+ Reason: "There are official review requests",
+ }
+ }
if pr.ProtectedBranch.MergeBlockedByOutdatedBranch(pr) {
return models.ErrNotAllowedToMerge{