mirror of
https://github.com/go-gitea/gitea
synced 2025-11-18 12:18:17 +00:00
Backport #31033 user should be a collaborator of the base repo to create a PR
This commit is contained in:
@@ -519,6 +519,8 @@ func CreatePullRequest(ctx *context.APIContext) {
|
||||
ctx.Error(http.StatusBadRequest, "UserDoesNotHaveAccessToRepo", err)
|
||||
} else if errors.Is(err, user_model.ErrBlockedUser) {
|
||||
ctx.Error(http.StatusForbidden, "BlockedUser", err)
|
||||
} else if errors.Is(err, issues_model.ErrMustCollaborator) {
|
||||
ctx.Error(http.StatusForbidden, "MustCollaborator", err)
|
||||
} else {
|
||||
ctx.Error(http.StatusInternalServerError, "NewPullRequest", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user