change output

This commit is contained in:
nigel007 2019-06-07 13:09:49 +08:00
parent d57561f116
commit e88f938979
2 changed files with 4 additions and 3 deletions
app

View File

@ -59,7 +59,7 @@ module Mobile
post 'join' do
authenticate!
# 根据repo_git_url找到repository对应的项目
Rails.logger.info("!!!!!!!!!!!in the join function")
rs = RepositoriesService.new
rs.findProjectByRepoUrl(params[:repo_url])
# owner = User.find_by_login(params[:ownername])

View File

@ -46,11 +46,12 @@ class RepositoriesService
# 根据repo_url找到所属project
def findProjectByRepoUrl repo_url
# 解析ownername
Rails.logger.info("in the findProjectByRepoUrl function")
repo_url = repo_url[Redmine::Configuration['gitlab_address'].to_s.length + 1..repo_url.length - 1]
index_split = repo_url.index("/")
owner_name = repo_url[0..index_split - 1]
puts "!!!!!!!!!!this is the owner name"
puts owner_name
Rails.logger.info("!!!!!!!!!!this is the owner name")
Rails.logger.info(owner_name)
end
end