Skip to content

Commit

Permalink
Allow empty assignees on pull request edit (#22150)
Browse files Browse the repository at this point in the history
Fixes #22140
  • Loading branch information
KN4CK3R authored Dec 21, 2022
1 parent 48d71b7 commit b767182
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions routers/api/v1/repo/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,11 @@ func EditPullRequest(ctx *context.APIContext) {
issue := pr.Issue
issue.Repo = ctx.Repo.Repository

if err := issue.LoadAttributes(ctx); err != nil {
ctx.Error(http.StatusInternalServerError, "LoadAttributes", err)
return
}

if !issue.IsPoster(ctx.Doer.ID) && !ctx.Repo.CanWrite(unit.TypePullRequests) {
ctx.Status(http.StatusForbidden)
return
Expand Down

0 comments on commit b767182

Please sign in to comment.