lib/atlassian/stash/pullrequest.rb in atlassian-stash-0.1.2 vs lib/atlassian/stash/pullrequest.rb in atlassian-stash-0.1.3
- old
+ new
@@ -46,11 +46,11 @@
def initialize(config)
@config = config
end
- def extract_repository_info
- if m = get_remote_url.match(/\/(\w+)\/(\w+).git$/)
+ def extract_repository_info (url = get_remote_url)
+ if m = url.match(/\/([a-zA-Z][a-zA-Z0-9_]*)\/([[:alnum:]][\w\-\.]*).git$/)
return RepoInfo.new(m[1], m[2])
end
raise "Repository does not seem to be hosted in Stash"
end