区分Gitlab公开项目和私有项目
This commit is contained in:
parent
7318b172ee
commit
16c31e254e
|
@ -10,6 +10,9 @@ module Trustie
|
|||
DEVELOPER = 30
|
||||
MASTER = 40
|
||||
OWNER = 50
|
||||
# 项目公开和私有
|
||||
PUBLIC = 20
|
||||
PRIVATE = 0
|
||||
end
|
||||
|
||||
class Sync
|
||||
|
@ -45,7 +48,8 @@ module Trustie
|
|||
issues_enabled: false,
|
||||
snippets_enabled: false,
|
||||
public: false,
|
||||
user_id: gid
|
||||
user_id: gid,
|
||||
visibility_level: project.is_public? ? UserLevel::PUBLIC : UserLevel::PRIVATE
|
||||
)
|
||||
project.gpid = gproject.id
|
||||
project.save!
|
||||
|
@ -84,7 +88,8 @@ module Trustie
|
|||
merge_requests_enabled: true,
|
||||
public: false,
|
||||
user_id: gid,
|
||||
import_url: import_url
|
||||
import_url: import_url,
|
||||
visibility_level: project.is_public? ? UserLevel::PUBLIC : UserLevel::PRIVATE
|
||||
)
|
||||
puts "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
|
||||
project.gpid = gproject.id
|
||||
|
|
Loading…
Reference in New Issue