mirror of
https://github.com/go-gitea/gitea
synced 2025-07-04 17:47:19 +00:00
Avoid amending the Rebase and Fast-forward merge if there is no message template (#25779)
Related #22669. Close #25177 After the fix:  Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
@ -110,6 +110,11 @@ func getMergeMessage(ctx context.Context, baseGitRepo *git.Repository, pr *issue
|
||||
}
|
||||
}
|
||||
|
||||
if mergeStyle == repo_model.MergeStyleRebase {
|
||||
// for fast-forward rebase, do not amend the last commit if there is no template
|
||||
return "", "", nil
|
||||
}
|
||||
|
||||
// Squash merge has a different from other styles.
|
||||
if mergeStyle == repo_model.MergeStyleSquash {
|
||||
return fmt.Sprintf("%s (%s%d)", pr.Issue.Title, issueReference, pr.Issue.Index), "", nil
|
||||
|
Reference in New Issue
Block a user