Skip to content

Commit

Permalink
Add change title notification for issues (#8064)
Browse files Browse the repository at this point in the history
  • Loading branch information
guillep2k authored and lunny committed Sep 3, 2019
1 parent 9bea8d8 commit 5d26760
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 @@ -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,
})
Expand Down

0 comments on commit 5d26760

Please sign in to comment.