diff options
Diffstat (limited to 'routers/repo/pull.go')
-rw-r--r-- | routers/repo/pull.go | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/routers/repo/pull.go b/routers/repo/pull.go index c2147bbaf5..8ad4f3f8e4 100644 --- a/routers/repo/pull.go +++ b/routers/repo/pull.go @@ -156,10 +156,7 @@ func checkPullInfo(ctx *context.Context) *models.Issue { return nil } - if err = issue.GetPoster(); err != nil { - ctx.Handle(500, "GetPoster", err) - return nil - } else if err = issue.GetPullRequest(); err != nil { + if err = issue.GetPullRequest(); err != nil { ctx.Handle(500, "GetPullRequest", err) return nil } else if err = issue.GetHeadRepo(); err != nil { @@ -682,10 +679,8 @@ func CompareAndPullRequestPost(ctx *context.Context, form auth.CreateIssueForm) } else if err := pullRequest.PushToBaseRepo(); err != nil { ctx.Handle(500, "PushToBaseRepo", err) return - } - - notifyWatchersAndMentions(ctx, pullIssue) - if ctx.Written() { + } else if err := MailWatchersAndMentions(ctx, pullIssue); err != nil { + ctx.Handle(500, "MailWatchersAndMentions", err) return } |