diff --git a/lib/github_changelog_generator/parser.rb b/lib/github_changelog_generator/parser.rb index e66ba45..e193b9b 100644 --- a/lib/github_changelog_generator/parser.rb +++ b/lib/github_changelog_generator/parser.rb @@ -72,7 +72,7 @@ module GitHubChangelogGenerator 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 && match[1] && match[2] puts "Detected user:#{match[1]}, project:#{match[2]}"