Refactor pull request view (3) (#37439)

Move some complex logic to backend

Rename `pr.CanAutoMerge` to `pr.IsStatusMergeable`
This commit is contained in:
wxiaoguang
2026-04-27 03:03:41 +08:00
committed by GitHub
parent 29c510ef94
commit 55c9b936cb
7 changed files with 123 additions and 72 deletions
+1 -1
View File
@@ -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
}