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

View File

@@ -437,8 +437,8 @@ func (pr *PullRequest) IsChecking() bool {
return pr.Status == PullRequestStatusChecking
}
// CanAutoMerge returns true if this pull request can be merged automatically.
func (pr *PullRequest) CanAutoMerge() bool {
// IsStatusMergeable returns true if this pull request is mergeable to its base
func (pr *PullRequest) IsStatusMergeable() bool {
return pr.Status == PullRequestStatusMergeable
}