Avoid run change title process when the title is same (#27467) (#27557)

Backport #27467 manually.

(cherry picked from commit e6d1afaee33bac32c905c15c15909ee22f63c9a6)
This commit is contained in:
yp05327 2023-10-10 16:01:24 +09:00 committed by Earl Warren
parent 2716e2f626
commit 2e50870688
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -58,6 +58,10 @@ func ChangeTitle(ctx context.Context, issue *issues_model.Issue, doer *user_mode
oldTitle := issue.Title
issue.Title = title
if oldTitle == title {
return nil
}
if err = issues_model.ChangeIssueTitle(ctx, issue, doer, oldTitle); err != nil {
return
}