From c6083c335e53a860fd4c500a86dcdda49a16515e Mon Sep 17 00:00:00 2001
From: Unknwon <u@gogs.io>
Date: Thu, 10 Dec 2015 11:18:56 -0500
Subject: #1612 Ability to send mail when a new pull request is submitted

---
 routers/repo/pull.go | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'routers/repo/pull.go')

diff --git a/routers/repo/pull.go b/routers/repo/pull.go
index d8163a4078..d0c1cb6703 100644
--- a/routers/repo/pull.go
+++ b/routers/repo/pull.go
@@ -634,6 +634,11 @@ func CompareAndPullRequestPost(ctx *middleware.Context, form auth.CreateIssueFor
 		return
 	}
 
+	notifyWatchersAndMentions(ctx, pull)
+	if ctx.Written() {
+		return
+	}
+
 	log.Trace("Pull request created: %d/%d", repo.ID, pull.ID)
 	ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + com.ToStr(pull.Index))
 }
-- 
cgit v1.2.3