Skip to content

Commit

Permalink
Add change title notification for issues (#8061)
Browse files Browse the repository at this point in the history
  • Loading branch information
guillep2k authored and techknowlogick committed Sep 3, 2019
1 parent ee11974 commit 8ae96a3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions routers/repo/issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -1045,11 +1045,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,
})
Expand Down

0 comments on commit 8ae96a3

Please sign in to comment.