diff options
author | Brecht Van Lommel <brecht@blender.org> | 2023-02-13 07:09:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-13 14:09:52 +0800 |
commit | 49919c636e4788a14f3762a0d9137ee2e0092790 (patch) | |
tree | acac92af0eff851eaea32416e17001ba0776032c /services/convert | |
parent | b6d77229cfbab146da6445467acab2125e9e5edb (diff) | |
download | gitea-49919c636e4788a14f3762a0d9137ee2e0092790.tar.gz gitea-49919c636e4788a14f3762a0d9137ee2e0092790.zip |
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 'services/convert')
-rw-r--r-- | services/convert/repository.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/services/convert/repository.go b/services/convert/repository.go index ce53a66692..3ba604002e 100644 --- a/services/convert/repository.go +++ b/services/convert/repository.go @@ -81,6 +81,7 @@ func innerToRepo(ctx context.Context, repo *repo_model.Repository, mode perm.Acc allowRebaseUpdate := false defaultDeleteBranchAfterMerge := false defaultMergeStyle := repo_model.MergeStyleMerge + defaultAllowMaintainerEdit := false if unit, err := repo.GetUnit(ctx, unit_model.TypePullRequests); err == nil { config := unit.PullRequestsConfig() hasPullRequests = true @@ -92,6 +93,7 @@ func innerToRepo(ctx context.Context, repo *repo_model.Repository, mode perm.Acc allowRebaseUpdate = config.AllowRebaseUpdate defaultDeleteBranchAfterMerge = config.DefaultDeleteBranchAfterMerge defaultMergeStyle = config.GetDefaultMergeStyle() + defaultAllowMaintainerEdit = config.DefaultAllowMaintainerEdit } hasProjects := false if _, err := repo.GetUnit(ctx, unit_model.TypeProjects); err == nil { @@ -182,6 +184,7 @@ func innerToRepo(ctx context.Context, repo *repo_model.Repository, mode perm.Acc AllowRebaseUpdate: allowRebaseUpdate, DefaultDeleteBranchAfterMerge: defaultDeleteBranchAfterMerge, DefaultMergeStyle: string(defaultMergeStyle), + DefaultAllowMaintainerEdit: defaultAllowMaintainerEdit, AvatarURL: repo.AvatarLink(), Internal: !repo.IsPrivate && repo.Owner.Visibility == api.VisibleTypePrivate, MirrorInterval: mirrorInterval, |