From 9bd9ad420582a7a34d18011847bb789f64271b1f Mon Sep 17 00:00:00 2001 From: Unknwon <u@gogs.io> Date: Sun, 13 Mar 2016 23:20:22 -0400 Subject: #1692 add CRUD issue APIs - Fix go-gogs-client#10 - Related to #809 --- routers/repo/pull.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'routers/repo/pull.go') diff --git a/routers/repo/pull.go b/routers/repo/pull.go index c2147bba..8ad4f3f8 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 } -- cgit v1.2.3