Skip to content

Commit 9cfcc07

Browse files
authored
Export repo's manual merge settings (#34502)
1 parent ec10c6b commit 9cfcc07

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

modules/structs/repo.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ type Repository struct {
101101
AllowSquash bool `json:"allow_squash_merge"`
102102
AllowFastForwardOnly bool `json:"allow_fast_forward_only_merge"`
103103
AllowRebaseUpdate bool `json:"allow_rebase_update"`
104+
AllowManualMerge bool `json:"allow_manual_merge"`
105+
AutodetectManualMerge bool `json:"autodetect_manual_merge"`
104106
DefaultDeleteBranchAfterMerge bool `json:"default_delete_branch_after_merge"`
105107
DefaultMergeStyle string `json:"default_merge_style"`
106108
DefaultAllowMaintainerEdit bool `json:"default_allow_maintainer_edit"`

services/convert/repository.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ func innerToRepo(ctx context.Context, repo *repo_model.Repository, permissionInR
9898
allowSquash := false
9999
allowFastForwardOnly := false
100100
allowRebaseUpdate := false
101+
allowManualMerge := true
102+
autodetectManualMerge := false
101103
defaultDeleteBranchAfterMerge := false
102104
defaultMergeStyle := repo_model.MergeStyleMerge
103105
defaultAllowMaintainerEdit := false
@@ -111,6 +113,8 @@ func innerToRepo(ctx context.Context, repo *repo_model.Repository, permissionInR
111113
allowSquash = config.AllowSquash
112114
allowFastForwardOnly = config.AllowFastForwardOnly
113115
allowRebaseUpdate = config.AllowRebaseUpdate
116+
allowManualMerge = config.AllowManualMerge
117+
autodetectManualMerge = config.AutodetectManualMerge
114118
defaultDeleteBranchAfterMerge = config.DefaultDeleteBranchAfterMerge
115119
defaultMergeStyle = config.GetDefaultMergeStyle()
116120
defaultAllowMaintainerEdit = config.DefaultAllowMaintainerEdit
@@ -235,6 +239,8 @@ func innerToRepo(ctx context.Context, repo *repo_model.Repository, permissionInR
235239
AllowSquash: allowSquash,
236240
AllowFastForwardOnly: allowFastForwardOnly,
237241
AllowRebaseUpdate: allowRebaseUpdate,
242+
AllowManualMerge: allowManualMerge,
243+
AutodetectManualMerge: autodetectManualMerge,
238244
DefaultDeleteBranchAfterMerge: defaultDeleteBranchAfterMerge,
239245
DefaultMergeStyle: string(defaultMergeStyle),
240246
DefaultAllowMaintainerEdit: defaultAllowMaintainerEdit,

templates/swagger/v1_json.tmpl

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)