gitlab同步问题
This commit is contained in:
parent
524e152b24
commit
024e299817
|
@ -53,6 +53,19 @@ module Trustie
|
|||
)
|
||||
project.gpid = gproject.id
|
||||
project.save!
|
||||
|
||||
# 创建的时候一并同步成员及角色
|
||||
project.members.each do |m|
|
||||
begin
|
||||
gid = m.user.gid
|
||||
unless gid
|
||||
gid = sync_user(m.user).id
|
||||
end
|
||||
self.g.add_team_member(gproject.id, gid, UserLevel::DEVELOPER)
|
||||
rescue => e
|
||||
puts e
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def sync_project(project, opt={})
|
||||
|
|
Loading…
Reference in New Issue