mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-04 20:13:24 +09:00
fix(pulls): hide branch deletion when an open PR uses the branch (#39193)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -591,7 +591,7 @@ func (prInfo *pullRequestViewInfo) prepareMergeBoxDeleteBranch(ctx *context.Cont
|
||||
isPullBranchDeletable, _ = git_model.IsBranchExist(ctx, pull.HeadRepo.ID, pull.HeadBranch)
|
||||
}
|
||||
|
||||
if isPullBranchDeletable && pull.HasMerged {
|
||||
if isPullBranchDeletable && prInfo.issue.IsClosed {
|
||||
exist, err := issues_model.HasUnmergedPullRequestsByHeadInfo(ctx, pull.HeadRepoID, pull.HeadBranch)
|
||||
if err != nil {
|
||||
ctx.ServerError("HasUnmergedPullRequestsByHeadInfo", err)
|
||||
|
||||
Reference in New Issue
Block a user