aboutsummaryrefslogtreecommitdiffstats
path: root/modules/structs
diff options
context:
space:
mode:
authorparnic <github@parnic.com>2021-03-27 09:55:40 -0500
committerGitHub <noreply@github.com>2021-03-27 15:55:40 +0100
commitf4d27498bdc615605e14f783501e1d1256cd8d22 (patch)
tree8d04695b060bd8bac65b4a0d669628fe220a23e6 /modules/structs
parent6b836ac5f7546bc9ffb118b213dba92d3dd9ba8e (diff)
downloadgitea-f4d27498bdc615605e14f783501e1d1256cd8d22.tar.gz
gitea-f4d27498bdc615605e14f783501e1d1256cd8d22.zip
Add DefaultMergeStyle option to repository (#14789)
Fixes #12293
Diffstat (limited to 'modules/structs')
-rw-r--r--modules/structs/repo.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/structs/repo.go b/modules/structs/repo.go
index c47700cd00..c23bd1033f 100644
--- a/modules/structs/repo.go
+++ b/modules/structs/repo.go
@@ -89,6 +89,7 @@ type Repository struct {
AllowRebase bool `json:"allow_rebase"`
AllowRebaseMerge bool `json:"allow_rebase_explicit"`
AllowSquash bool `json:"allow_squash_merge"`
+ DefaultMergeStyle string `json:"default_merge_style"`
AvatarURL string `json:"avatar_url"`
Internal bool `json:"internal"`
MirrorInterval string `json:"mirror_interval"`
@@ -171,6 +172,8 @@ type EditRepoOption struct {
AllowManualMerge *bool `json:"allow_manual_merge,omitempty"`
// either `true` to enable AutodetectManualMerge, or `false` to prevent it. `has_pull_requests` must be `true`, Note: In some special cases, misjudgments can occur.
AutodetectManualMerge *bool `json:"autodetect_manual_merge,omitempty"`
+ // set to a merge style to be used by this repository: "merge", "rebase", "rebase-merge", or "squash". `has_pull_requests` must be `true`.
+ DefaultMergeStyle *string `json:"default_merge_style,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