lib/danger/ci_source/jenkins.rb in danger-4.2.2 vs lib/danger/ci_source/jenkins.rb in danger-4.3.0
- old
+ new
@@ -64,11 +64,11 @@
repo_matches = self.repo_url.match(%r{(?:[\/:])projects\/([^\/.]+)\/repos\/([^\/.]+)}) # Bitbucket Server
if repo_matches
self.repo_slug = "#{repo_matches[1]}/#{repo_matches[2]}"
else
- repo_matches = self.repo_url.match(%r{([\/:])([^\/]+\/[^\/.]+)(?:.git)?$})
- self.repo_slug = repo_matches[2] unless repo_matches.nil?
+ repo_matches = self.repo_url.match(%r{([\/:])([^\/]+\/[^\/]+)$})
+ self.repo_slug = repo_matches[2].gsub(/\.git$/, "") unless repo_matches.nil?
end
end
def self.pull_request_id(env)
if env["ghprbPullId"]