mirror of
https://github.com/go-gitea/gitea.git
synced 2025-10-12 11:46:04 +00:00
Add rebase push display wrong comments bug (#35560)
Fix #35518 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -243,6 +243,17 @@ func ChangeTargetBranch(ctx context.Context, pr *issues_model.PullRequest, doer
|
||||
}
|
||||
}
|
||||
|
||||
exist, err := git_model.IsBranchExist(ctx, pr.BaseRepoID, targetBranch)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !exist {
|
||||
return git_model.ErrBranchNotExist{
|
||||
RepoID: pr.BaseRepoID,
|
||||
BranchName: targetBranch,
|
||||
}
|
||||
}
|
||||
|
||||
// Check if branches are equal
|
||||
branchesEqual, err := IsHeadEqualWithBranch(ctx, pr, targetBranch)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user