Fix bug with auto-detect project name, when there is dot signs in project name
add fix for username also
This commit is contained in:
parent
1af8e18f9f
commit
1357b3980d
|
@ -56,9 +56,9 @@ class Parser
|
|||
|
||||
if !options[:user] && !options[:project]
|
||||
remote = `git remote -vv`.split("\n")
|
||||
match = /.*(?:[:\/])(\w*)\/((?:-|\w)*)\.git.*/.match(remote[0])
|
||||
match = /.*(?:[:\/])((?:-|\w|\.)*)\/((?:-|\w|\.)*)\.git.*/.match(remote[0])
|
||||
|
||||
if match[1] && match[2]
|
||||
if match && match[1] && match[2]
|
||||
puts "Detected user:#{match[1]}, project:#{match[2]}"
|
||||
options[:user], options[:project] = match[1], match[2]
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user