mirror of
https://github.com/go-gitea/gitea
synced 2024-12-25 18:14:28 +00:00
Add change title notification for issues (#8064)
This commit is contained in:
parent
9bea8d825b
commit
5d2676089e
@ -1047,11 +1047,14 @@ func UpdateIssueTitle(ctx *context.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
oldTitle := issue.Title
|
||||||
if err := issue.ChangeTitle(ctx.User, title); err != nil {
|
if err := issue.ChangeTitle(ctx.User, title); err != nil {
|
||||||
ctx.ServerError("ChangeTitle", err)
|
ctx.ServerError("ChangeTitle", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
notification.NotifyIssueChangeTitle(ctx.User, issue, oldTitle)
|
||||||
|
|
||||||
ctx.JSON(200, map[string]interface{}{
|
ctx.JSON(200, map[string]interface{}{
|
||||||
"title": issue.Title,
|
"title": issue.Title,
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user