Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

OK, this *seems* to be the right regexp for getting Github username/r…

…epo from various Git remote URLs
  • Loading branch information...
commit f854df66915b00cd1f5145123ae6503ffd88e6ea 1 parent 1fdadb6
@karmi authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  vendor/githubber.rb
View
2  vendor/githubber.rb
@@ -10,7 +10,7 @@ def initialize(working_copy_path)
remotes = %x[cd #{working_copy_path}; git remote -v 2>&1] rescue nil
return nil unless $?.success?
origin = remotes.select { |l| l =~ /^origin.*/ }.first
- @user, @repo = origin.to_s.scan(/\:(\S*)\/(\S*)\.git/).first
+ @user, @repo = origin.to_s.scan(/\S+[:\/]+?(\S+)?\/(\S+)?\.git$/).first
end
# Returns revision info
Please sign in to comment.
Something went wrong with that request. Please try again.