Refactor pull request view (3) (#37439)

Move some complex logic to backend

Rename `pr.CanAutoMerge` to `pr.IsStatusMergeable`
This commit is contained in:
wxiaoguang authored and GitHub committed 2026-04-26 19:03:41 +00:00
1 parent 29c510ef94
commit 55c9b936cb
7 files changed
+123 -72

No files matched your search

+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
}