Skip to content

Commit

Permalink
Allow empty assignees on pull request edit (go-gitea#22150)
Browse files Browse the repository at this point in the history
  • Loading branch information
KN4CK3R committed Dec 22, 2022
1 parent 73189f0 commit 8f8d2ce
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 @@ -488,6 +488,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 8f8d2ce

Please sign in to comment.