diff --git a/github_changelog_generator.gemspec b/github_changelog_generator.gemspec index a99fa8a..2c8f77e 100644 --- a/github_changelog_generator.gemspec +++ b/github_changelog_generator.gemspec @@ -14,7 +14,7 @@ Gem::Specification.new do |spec| spec.email = %q{sky4winder+github_changelog_generator@gmail.com} spec.date = `date +"%Y-%m-%d"`.strip! spec.summary = %q{Script, that automatically generate changelog from your tags, issues, labels and pull requests.} - spec.description = %q{Script, that automatically generate changelog from your tags, issues, labels and pull requests.} + spec.description = %q{Changelog generation has never been so easy. Fully automate changelog generation - this gem generate change log file based on tags, issues and merged pull requests from Github issue tracker.} spec.homepage = %q{https://github.com/skywinder/Github-Changelog-Generator} spec.license = "MIT" diff --git a/lib/CHANGELOG.md b/lib/CHANGELOG.md index 59664f1..e4c072b 100644 --- a/lib/CHANGELOG.md +++ b/lib/CHANGELOG.md @@ -1,5 +1,19 @@ # Change Log +## [Unreleased](https://github.com/skywinder/changelog_test/tree/HEAD) + +[Full Changelog](https://github.com/skywinder/changelog_test/compare/v0.0.2...HEAD) + +**Merged pull requests:** + +- Here is a test hotfix should appear in v.0.0.2 [\#2](https://github.com/skywinder/changelog_test/pull/2) ([skywinder](https://github.com/skywinder)) + +## [v0.0.2](https://github.com/skywinder/changelog_test/tree/v0.0.2) (2015-03-04) + +[Full Changelog](https://github.com/skywinder/changelog_test/compare/v0.0.1...v0.0.2) + +## [v0.0.1](https://github.com/skywinder/changelog_test/tree/v0.0.1) (2015-03-02) + \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* \ No newline at end of file diff --git a/lib/github_changelog_generator/parser.rb b/lib/github_changelog_generator/parser.rb index fd0723c..c98b9eb 100644 --- a/lib/github_changelog_generator/parser.rb +++ b/lib/github_changelog_generator/parser.rb @@ -26,7 +26,8 @@ module GitHubChangelogGenerator :filter_issues_by_milestone => true, :compare_link => true, :unreleased => true, - :unreleased_label => 'Unreleased' + :unreleased_label => 'Unreleased', + :branch => 'origin' } parser = OptionParser.new { |opts| @@ -129,11 +130,20 @@ module GitHubChangelogGenerator if !options[:user] && !options[:project] remote = `git remote -vv`.split("\n") - match = /.*(?:[:\/])((?:-|\w|\.)*)\/((?:-|\w|\.)*)?(?:\.git).*/.match(remote[0]) + # try to find repo in format: origin git@github.com:skywinder/Github-Changelog-Generator.git (fetch) + remote.select { |v| v.include? options[:branch] } + match = /.*(?:[:\/])((?:-|\w|\.)*)\/((?:-|\w|\.)*)(?:\.git).*/.match(remote[0]) if match && match[1] && match[2] puts "Detected user:#{match[1]}, project:#{match[2]}" options[:user], options[:project] = match[1], match[2] + else + # try to find repo in format: origin https://github.com/skywinder/ChangelogMerger (fetch) + match = /.*\/((?:-|\w|\.)*)\/((?:-|\w|\.)*).*/.match(remote[0]) + if match && match[1] && match[2] + puts "Detected user:#{match[1]}, project:#{match[2]}" + options[:user], options[:project] = match[1], match[2] + end end end diff --git a/lib/github_changelog_generator/version.rb b/lib/github_changelog_generator/version.rb index 051e366..c467884 100644 --- a/lib/github_changelog_generator/version.rb +++ b/lib/github_changelog_generator/version.rb @@ -1,3 +1,3 @@ module GitHubChangelogGenerator - VERSION = '1.3.6' + VERSION = '1.3.8' end