Add 'allow_maintainer_edit' API option for creating a pull request (#36283)

WebUI has a checkbox for enabling maintainer edits you can check right
away when creating a new pull request.
Also, it is possible to set `allow_maintainer_edit` in an existing pull
request via API.
This change enables the option while creating a new pull request via
API.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Daniel Mach
2026-01-05 18:00:26 +01:00
committed by GitHub
parent 1ee7f8e966
commit 1d01286f4c
4 changed files with 32 additions and 2 deletions

View File

@@ -140,6 +140,8 @@ type CreatePullRequestOption struct {
Reviewers []string `json:"reviewers"`
// The list of team reviewer names
TeamReviewers []string `json:"team_reviewers"`
// Whether maintainers can edit the pull request
AllowMaintainerEdit *bool `json:"allow_maintainer_edit"`
}
// EditPullRequestOption options when modify pull request