diff options
author | Brecht Van Lommel | 2023-02-13 07:09:52 +0100 |
---|---|---|
committer | GitHub | 2023-02-13 14:09:52 +0800 |
commit | 49919c636e4788a14f3762a0d9137ee2e0092790 (patch) | |
tree | acac92af0eff851eaea32416e17001ba0776032c /modules | |
parent | b6d77229cfbab146da6445467acab2125e9e5edb (diff) |
Pull Requests: setting to allow edits by maintainers by default, tweak UI (#22862)
Add setting to allow edits by maintainers by default, to avoid having to
often ask contributors to enable this.
This also reorganizes the pull request settings UI to improve clarity.
It was unclear which checkbox options were there to control available
merge styles and which merge styles they correspond to.
Now there is a "Merge Styles" label followed by the merge style options
with the same name as in other menus. The remaining checkboxes were
moved to the bottom, ordered rougly by typical order of operations.
---------
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/structs/repo.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/structs/repo.go b/modules/structs/repo.go index ee4bec4df..b5a26a815 100644 --- a/modules/structs/repo.go +++ b/modules/structs/repo.go @@ -96,6 +96,7 @@ type Repository struct { AllowRebaseUpdate bool `json:"allow_rebase_update"` DefaultDeleteBranchAfterMerge bool `json:"default_delete_branch_after_merge"` DefaultMergeStyle string `json:"default_merge_style"` + DefaultAllowMaintainerEdit bool `json:"default_allow_maintainer_edit"` AvatarURL string `json:"avatar_url"` Internal bool `json:"internal"` MirrorInterval string `json:"mirror_interval"` @@ -187,6 +188,8 @@ type EditRepoOption struct { DefaultDeleteBranchAfterMerge *bool `json:"default_delete_branch_after_merge,omitempty"` // set to a merge style to be used by this repository: "merge", "rebase", "rebase-merge", or "squash". DefaultMergeStyle *string `json:"default_merge_style,omitempty"` + // set to `true` to allow edits from maintainers by default + DefaultAllowMaintainerEdit *bool `json:"default_allow_maintainer_edit,omitempty"` // set to `true` to archive this repository. Archived *bool `json:"archived,omitempty"` // set to a string like `8h30m0s` to set the mirror interval time |