Add change title notification for issues (#8064)

This commit is contained in:
guillep2k 2019-09-03 00:39:53 -03:00 committed by Lunny Xiao
parent 9bea8d825b
commit 5d2676089e
1 changed files with 3 additions and 0 deletions

View 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,
})