Skip to content

Commit d277744

Browse files
KN4CK3Rlunny
andauthored
Allow empty assignees on pull request edit (#22150) (#22214)
Backport of #22150 Co-authored-by: Lunny Xiao <[email protected]>
1 parent 198342e commit d277744

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

routers/api/v1/repo/pull.go

+5
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,11 @@ func EditPullRequest(ctx *context.APIContext) {
491491
issue := pr.Issue
492492
issue.Repo = ctx.Repo.Repository
493493

494+
if err := issue.LoadAttributes(ctx); err != nil {
495+
ctx.Error(http.StatusInternalServerError, "LoadAttributes", err)
496+
return
497+
}
498+
494499
if !issue.IsPoster(ctx.Doer.ID) && !ctx.Repo.CanWrite(unit.TypePullRequests) {
495500
ctx.Status(http.StatusForbidden)
496501
return

0 commit comments

Comments
 (0)