]> source.dussan.org Git - gitea.git/commitdiff
Add change title notification for issues (#8064)
authorguillep2k <18600385+guillep2k@users.noreply.github.com>
Tue, 3 Sep 2019 03:39:53 +0000 (00:39 -0300)
committerLunny Xiao <xiaolunwen@gmail.com>
Tue, 3 Sep 2019 03:39:53 +0000 (11:39 +0800)
routers/repo/issue.go

index 3904d29532fded6432c3735062d0ccea196abfa2..12c38b86208d85d1b78aba3bf92d2bf771896fb0 100644 (file)
@@ -1047,11 +1047,14 @@ func UpdateIssueTitle(ctx *context.Context) {
                return
        }
 
+       oldTitle := issue.Title
        if err := issue.ChangeTitle(ctx.User, title); err != nil {
                ctx.ServerError("ChangeTitle", err)
                return
        }
 
+       notification.NotifyIssueChangeTitle(ctx.User, issue, oldTitle)
+
        ctx.JSON(200, map[string]interface{}{
                "title": issue.Title,
        })