@ -78,6 +78,8 @@ func innerToRepo(repo *repo_model.Repository, mode perm.AccessMode, isParent boo
allowRebase := false
allowRebase := false
allowRebaseMerge := false
allowRebaseMerge := false
allowSquash := false
allowSquash := false
allowRebaseUpdate := false
defaultDeleteBranchAfterMerge := false
defaultMergeStyle := repo_model . MergeStyleMerge
defaultMergeStyle := repo_model . MergeStyleMerge
if unit , err := repo . GetUnit ( unit_model . TypePullRequests ) ; err == nil {
if unit , err := repo . GetUnit ( unit_model . TypePullRequests ) ; err == nil {
config := unit . PullRequestsConfig ( )
config := unit . PullRequestsConfig ( )
@ -87,6 +89,8 @@ func innerToRepo(repo *repo_model.Repository, mode perm.AccessMode, isParent boo
allowRebase = config . AllowRebase
allowRebase = config . AllowRebase
allowRebaseMerge = config . AllowRebaseMerge
allowRebaseMerge = config . AllowRebaseMerge
allowSquash = config . AllowSquash
allowSquash = config . AllowSquash
allowRebaseUpdate = config . AllowRebaseUpdate
defaultDeleteBranchAfterMerge = config . DefaultDeleteBranchAfterMerge
defaultMergeStyle = config . GetDefaultMergeStyle ( )
defaultMergeStyle = config . GetDefaultMergeStyle ( )
}
}
hasProjects := false
hasProjects := false
@ -175,6 +179,8 @@ func innerToRepo(repo *repo_model.Repository, mode perm.AccessMode, isParent boo
AllowRebase : allowRebase ,
AllowRebase : allowRebase ,
AllowRebaseMerge : allowRebaseMerge ,
AllowRebaseMerge : allowRebaseMerge ,
AllowSquash : allowSquash ,
AllowSquash : allowSquash ,
AllowRebaseUpdate : allowRebaseUpdate ,
DefaultDeleteBranchAfterMerge : defaultDeleteBranchAfterMerge ,
DefaultMergeStyle : string ( defaultMergeStyle ) ,
DefaultMergeStyle : string ( defaultMergeStyle ) ,
AvatarURL : repo . AvatarLink ( ) ,
AvatarURL : repo . AvatarLink ( ) ,
Internal : ! repo . IsPrivate && repo . Owner . Visibility == api . VisibleTypePrivate ,
Internal : ! repo . IsPrivate && repo . Owner . Visibility == api . VisibleTypePrivate ,