From 29d3949271bd221e9bdef455d187f1246a4b4cc3 Mon Sep 17 00:00:00 2001 From: yp05327 <576951401@qq.com> Date: Tue, 10 Oct 2023 16:01:46 +0900 Subject: [PATCH] Avoid run change title process when the title is same (#27467) (#27558) Backport #27467 manually. --- services/issue/issue.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/services/issue/issue.go b/services/issue/issue.go index fb95fcada3c..04e12e2c997 100644 --- a/services/issue/issue.go +++ b/services/issue/issue.go @@ -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 }