]> source.dussan.org Git - gitea.git/commitdiff
Avoid run change title process when the title is same (#27467) (#27557)
authoryp05327 <576951401@qq.com>
Tue, 10 Oct 2023 07:01:24 +0000 (16:01 +0900)
committerGitHub <noreply@github.com>
Tue, 10 Oct 2023 07:01:24 +0000 (09:01 +0200)
Backport #27467 manually.

services/issue/issue.go

index 596b27c58898f6b5da2489b6846408f31478ffa2..8ae9097ff4e189ae7ef3338dc844517eda86bb31 100644 (file)
@@ -53,6 +53,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
        }