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