clear stopwatch on merging a PR

This commit is contained in:
Lanre Adelowo 2018-06-27 17:23:52 +01:00
parent e87c540a87
commit fd55ef478c

View File

@ -534,6 +534,13 @@ func MergePullRequest(ctx *context.Context, form auth.MergePullRequestForm) {
return
}
if models.StopwatchExists(ctx.User.ID, issue.ID) {
if err := models.CreateOrStopIssueStopwatch(ctx.User, issue); err != nil {
ctx.ServerError("CreateOrStopIssueStopwatch", err)
return
}
}
notification.Service.NotifyIssue(pr.Issue, ctx.User.ID)
log.Trace("Pull request merged: %d", pr.ID)