Refactor pull request view (3) (#37439)
Move some complex logic to backend Rename `pr.CanAutoMerge` to `pr.IsStatusMergeable`
This commit is contained in:
@@ -168,7 +168,7 @@ func CheckPullMergeable(stdCtx context.Context, doer *user_model.User, perm *acc
|
||||
return ErrIsWorkInProgress
|
||||
}
|
||||
|
||||
if !pr.CanAutoMerge() && !pr.IsEmpty() {
|
||||
if !pr.IsStatusMergeable() && !pr.IsEmpty() {
|
||||
return ErrNotMergeableState
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user