aboutsummaryrefslogtreecommitdiffstats
path: root/modules/convert
diff options
context:
space:
mode:
Diffstat (limited to 'modules/convert')
-rw-r--r--modules/convert/repository.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/convert/repository.go b/modules/convert/repository.go
index 813201ca68..63a22bb04e 100644
--- a/modules/convert/repository.go
+++ b/modules/convert/repository.go
@@ -71,6 +71,7 @@ func innerToRepo(repo *models.Repository, mode models.AccessMode, isParent bool)
allowRebase := false
allowRebaseMerge := false
allowSquash := false
+ defaultMergeStyle := models.MergeStyleMerge
if unit, err := repo.GetUnit(models.UnitTypePullRequests); err == nil {
config := unit.PullRequestsConfig()
hasPullRequests = true
@@ -79,6 +80,7 @@ func innerToRepo(repo *models.Repository, mode models.AccessMode, isParent bool)
allowRebase = config.AllowRebase
allowRebaseMerge = config.AllowRebaseMerge
allowSquash = config.AllowSquash
+ defaultMergeStyle = config.GetDefaultMergeStyle()
}
hasProjects := false
if _, err := repo.GetUnit(models.UnitTypeProjects); err == nil {
@@ -139,6 +141,7 @@ func innerToRepo(repo *models.Repository, mode models.AccessMode, isParent bool)
AllowRebase: allowRebase,
AllowRebaseMerge: allowRebaseMerge,
AllowSquash: allowSquash,
+ DefaultMergeStyle: string(defaultMergeStyle),
AvatarURL: repo.AvatarLink(),
Internal: !repo.IsPrivate && repo.Owner.Visibility == api.VisibleTypePrivate,
MirrorInterval: mirrorInterval,