|
|
|
@ -69,6 +69,11 @@ module Trustie
|
|
|
|
|
|
|
|
|
|
# import url http://xianbo_trustie2:1234@repository.trustie.net/xianbo/trustie2.git
|
|
|
|
|
# can use password
|
|
|
|
|
puts "@@@@@@@@@@@@@@@@@@@@@@@"
|
|
|
|
|
puts path
|
|
|
|
|
puts project.description
|
|
|
|
|
puts gid
|
|
|
|
|
puts import_url
|
|
|
|
|
gproject = self.g.create_project(path,
|
|
|
|
|
path: path,
|
|
|
|
|
description: project.description,
|
|
|
|
@ -81,6 +86,7 @@ module Trustie
|
|
|
|
|
user_id: gid,
|
|
|
|
|
import_url: import_url
|
|
|
|
|
)
|
|
|
|
|
puts "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
|
|
|
|
|
project.gpid = gproject.id
|
|
|
|
|
project.save!
|
|
|
|
|
puts "Successfully created #{project.name}"
|
|
|
|
@ -100,6 +106,20 @@ module Trustie
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def only_members(project)
|
|
|
|
|
project.members.each do |m|
|
|
|
|
|
begin
|
|
|
|
|
gid = m.user.gid
|
|
|
|
|
unless gid
|
|
|
|
|
gid = sync_user(m.user).id
|
|
|
|
|
end
|
|
|
|
|
self.g.add_team_member(project.gpid, gid, UserLevel::DEVELOPER)
|
|
|
|
|
rescue => e
|
|
|
|
|
puts e
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def remove_project
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|