gitlab同步问题

This commit is contained in:
huang 2016-01-21 15:29:06 +08:00
parent 524e152b24
commit 024e299817
1 changed files with 13 additions and 0 deletions

View File

@ -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={})