Skip to content

Commit 06575c9

Browse files
committed
Merge branch 'release/1.3.8'
2 parents 75ae6f4 + aa88122 commit 06575c9

File tree

4 files changed

+28
-4
lines changed

4 files changed

+28
-4
lines changed

github_changelog_generator.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
1414
spec.email = %q{sky4winder+github_changelog_generator@gmail.com}
1515
spec.date = `date +"%Y-%m-%d"`.strip!
1616
spec.summary = %q{Script, that automatically generate changelog from your tags, issues, labels and pull requests.}
17-
spec.description = %q{Script, that automatically generate changelog from your tags, issues, labels and pull requests.}
17+
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.}
1818
spec.homepage = %q{https://github.com/skywinder/Github-Changelog-Generator}
1919
spec.license = "MIT"
2020

lib/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Change Log
22

3+
## [Unreleased](https://github.com/skywinder/changelog_test/tree/HEAD)
4+
5+
[Full Changelog](https://github.com/skywinder/changelog_test/compare/v0.0.2...HEAD)
6+
7+
**Merged pull requests:**
8+
9+
- 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))
10+
11+
## [v0.0.2](https://github.com/skywinder/changelog_test/tree/v0.0.2) (2015-03-04)
12+
13+
[Full Changelog](https://github.com/skywinder/changelog_test/compare/v0.0.1...v0.0.2)
14+
15+
## [v0.0.1](https://github.com/skywinder/changelog_test/tree/v0.0.1) (2015-03-02)
16+
317

418

519
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*

lib/github_changelog_generator/parser.rb

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ def self.parse_options
2626
:filter_issues_by_milestone => true,
2727
:compare_link => true,
2828
:unreleased => true,
29-
:unreleased_label => 'Unreleased'
29+
:unreleased_label => 'Unreleased',
30+
:branch => 'origin'
3031
}
3132

3233
parser = OptionParser.new { |opts|
@@ -129,11 +130,20 @@ def self.parse_options
129130

130131
if !options[:user] && !options[:project]
131132
remote = `git remote -vv`.split("\n")
132-
match = /.*(?:[:\/])((?:-|\w|\.)*)\/((?:-|\w|\.)*)?(?:\.git).*/.match(remote[0])
133+
# try to find repo in format: origin git@github.com:skywinder/Github-Changelog-Generator.git (fetch)
134+
remote.select { |v| v.include? options[:branch] }
135+
match = /.*(?:[:\/])((?:-|\w|\.)*)\/((?:-|\w|\.)*)(?:\.git).*/.match(remote[0])
133136

134137
if match && match[1] && match[2]
135138
puts "Detected user:#{match[1]}, project:#{match[2]}"
136139
options[:user], options[:project] = match[1], match[2]
140+
else
141+
# try to find repo in format: origin https://github.com/skywinder/ChangelogMerger (fetch)
142+
match = /.*\/((?:-|\w|\.)*)\/((?:-|\w|\.)*).*/.match(remote[0])
143+
if match && match[1] && match[2]
144+
puts "Detected user:#{match[1]}, project:#{match[2]}"
145+
options[:user], options[:project] = match[1], match[2]
146+
end
137147
end
138148
end
139149

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module GitHubChangelogGenerator
2-
VERSION = '1.3.6'
2+
VERSION = '1.3.8'
33
end

0 commit comments

Comments
 (0)