summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/pull.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-10-29 00:45:43 +0800
committerGitHub <noreply@github.com>2019-10-29 00:45:43 +0800
commitaf8957bc4ce78613fe03cb1abc6c961dd67ff344 (patch)
treeb17b15eddca01c46d53d38abf184a2450e557de4 /routers/api/v1/repo/pull.go
parente3875ace913ca428804acc9a9ee1cd0b06cd8026 (diff)
downloadgitea-af8957bc4ce78613fe03cb1abc6c961dd67ff344.tar.gz
gitea-af8957bc4ce78613fe03cb1abc6c961dd67ff344.zip
Move issue notifications (#8713)
Diffstat (limited to 'routers/api/v1/repo/pull.go')
-rw-r--r--routers/api/v1/repo/pull.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/routers/api/v1/repo/pull.go b/routers/api/v1/repo/pull.go
index d4ce00fa12..0180aebf89 100644
--- a/routers/api/v1/repo/pull.go
+++ b/routers/api/v1/repo/pull.go
@@ -305,7 +305,7 @@ func CreatePullRequest(ctx *context.APIContext, form api.CreatePullRequestOption
}
}
- if err := pull_service.NewPullRequest(repo, prIssue, labelIDs, []string{}, pr, patch); err != nil {
+ if err := pull_service.NewPullRequest(repo, prIssue, labelIDs, []string{}, pr, patch, assigneeIDs); err != nil {
if models.IsErrUserDoesNotHaveAccessToRepo(err) {
ctx.Error(400, "UserDoesNotHaveAccessToRepo", err)
return
@@ -317,11 +317,6 @@ func CreatePullRequest(ctx *context.APIContext, form api.CreatePullRequestOption
return
}
- if err := issue_service.AddAssignees(prIssue, ctx.User, assigneeIDs); err != nil {
- ctx.ServerError("AddAssignees", err)
- return
- }
-
notification.NotifyNewPullRequest(pr)
log.Trace("Pull request created: %d/%d", repo.ID, prIssue.ID)