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

services/issue/issue.go

index fb95fcada3c082f5fcd36f34f4edbdc3d316f803..04e12e2c99745e64036c148ad606af134b9351e9 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 err
        }