lib/danger/commands/init.rb in danger-9.1.0 vs lib/danger/commands/init.rb in danger-9.2.0
- old
+ new
@@ -143,10 +143,10 @@
end
def current_repo_slug
git = GitRepo.new
- author_repo_regexp = %r{(?:[\/:])([^\/]+\/[^\/]+)(?:.git)?$}
+ author_repo_regexp = %r{(?:[/:])([^/]+/[^/]+)(?:.git)?$}
last_git_regexp = /.git$/
matches = git.origins.match(author_repo_regexp)
matches ? matches[1].gsub(last_git_regexp, "").strip : "[Your/Repo]"