修改rake 任务获取gitlab roles方法
This commit is contained in:
parent
f82ea16102
commit
1561a1176a
|
@ -15,10 +15,11 @@ namespace :gitlab do
|
|||
if gid.nil?
|
||||
gid = sync_user(m.user).id
|
||||
end
|
||||
access_level = m.roles[0].position == 3 ? 40 : (m.roles[0].position == 4 ? 30 : 20)
|
||||
# sync project's members
|
||||
g.add_team_member(project.gpid, gid, get_gitlab_role(m))
|
||||
g.add_team_member(project.gpid, gid, access_level)
|
||||
# sync members' roles
|
||||
g.edit_team_member(project.gpid, gid, get_gitlab_role(m))
|
||||
g.edit_team_member(project.gpid, gid, access_level)
|
||||
rescue => e
|
||||
puts e
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue