mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-20 16:10:50 +00:00
Move issue notifications (#8713)
This commit is contained in:
parent
e3875ace91
commit
af8957bc4c
7 changed files with 35 additions and 55 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue