1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-09 11:08:19 +00:00

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

Backport #27467 manually.
This commit is contained in:
yp05327
2023-10-10 16:01:24 +09:00
committed by GitHub
parent 1d4c193df5
commit e6d1afaee3

View File

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