From 2e50870688837de680216cc935224f8847078307 Mon Sep 17 00:00:00 2001 From: yp05327 <576951401@qq.com> Date: Tue, 10 Oct 2023 16:01:24 +0900 Subject: [PATCH] Avoid run change title process when the title is same (#27467) (#27557) Backport #27467 manually. (cherry picked from commit e6d1afaee33bac32c905c15c15909ee22f63c9a6) --- services/issue/issue.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/services/issue/issue.go b/services/issue/issue.go index e9ec44008e..a8afcbfbd6 100644 --- a/services/issue/issue.go +++ b/services/issue/issue.go @@ -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 }