Commit fc8bd8f7 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Add ssh support for next syntax: git clone ssh://git@localhost/group/project.git

parent 3d099f2e
......@@ -6,7 +6,9 @@ require_relative 'gitlab_config'
class GitlabNet
def allowed?(cmd, repo, key, ref)
project_name = repo.gsub("'", "")
project_name = project_name.gsub(/\.git$/, "")
project_name = project_name.gsub(/\.git\Z/, "")
project_name = project_name.gsub(/\A\//, "")
key_id = key.gsub("key-", "")
url = "#{host}/allowed?key_id=#{key_id}&action=#{cmd}&ref=#{ref}&project=#{project_name}"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment