mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-14 05:52:43 +00:00
Add block on official review requests branch protection (#13705)
Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
parent
7ed5bf8cbe
commit
9c26dc1f3a
14 changed files with 228 additions and 141 deletions
|
@ -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{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue