|
|
|
@ -286,7 +286,8 @@ func CreatePullRequest(ctx *context.APIContext, form api.CreatePullRequestOption
|
|
|
|
|
}
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
// Check if the passed assignees is assignable
|
|
|
|
|
|
|
|
|
|
if assigneeIDs != nil {
|
|
|
|
|
for _, aID := range assigneeIDs {
|
|
|
|
|
assignee, err := models.GetUserByID(aID)
|
|
|
|
|
if err != nil {
|
|
|
|
@ -294,6 +295,7 @@ func CreatePullRequest(ctx *context.APIContext, form api.CreatePullRequestOption
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Check if the passed assignees is assignable
|
|
|
|
|
valid, err := models.CanBeAssigned(assignee, repo, true)
|
|
|
|
|
if err != nil {
|
|
|
|
|
ctx.Error(500, "canBeAssigned", err)
|
|
|
|
@ -304,6 +306,7 @@ func CreatePullRequest(ctx *context.APIContext, form api.CreatePullRequestOption
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if err := pull_service.NewPullRequest(repo, prIssue, labelIDs, []string{}, pr, patch, assigneeIDs); err != nil {
|
|
|
|
|
if models.IsErrUserDoesNotHaveAccessToRepo(err) {
|
|
|
|
|