Merge branch 'release/1.7.0'

This commit is contained in:
Petr Korolev 2015-07-16 17:22:58 +03:00
commit d081130e3e
8 changed files with 67 additions and 56 deletions

View File

@ -1,5 +1,5 @@
# This configuration was generated by `rubocop --auto-gen-config`
# on 2015-06-12 11:23:12 +0300 using RuboCop version 0.31.0.
# on 2015-07-16 14:46:25 +0300 using RuboCop version 0.31.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
@ -7,7 +7,7 @@
# Offense count: 13
Metrics/AbcSize:
Max: 71
Enabled: false
# Offense count: 1
Metrics/CyclomaticComplexity:

15
Gemfile
View File

@ -1,14 +1,11 @@
source "https://rubygems.org"
gem "rake", ">=10.4.2"
gem "github_api", ">=0.12.3"
gem "colorize", ">=0.7.7"
gemspec
group :test do
gem "rspec"
gem "rubocop"
gem "coveralls", require: false
gem "simplecov", require: false
gem "codeclimate-test-reporter"
gem "rspec", "~>3.2"
gem "rubocop", "~>0.31"
gem "coveralls", "~>0.8", require: false
gem "simplecov", "~>0.10", require: false
gem "codeclimate-test-reporter", "~>0.4"
end

View File

@ -1,14 +1,21 @@
PATH
remote: .
specs:
github_changelog_generator (1.6.2)
colorize (~> 0.7)
github_api (~> 0.12)
GEM
remote: https://rubygems.org/
specs:
addressable (2.3.8)
ast (2.0.0)
astrolabe (1.3.0)
parser (>= 2.2.0.pre.3, < 3.0)
astrolabe (1.3.1)
parser (~> 2.2)
codeclimate-test-reporter (0.4.7)
simplecov (>= 0.7.1, < 1.0.0)
colorize (0.7.7)
coveralls (0.8.1)
coveralls (0.8.2)
json (~> 1.8)
rest-client (>= 1.6.8, < 2)
simplecov (~> 0.10.0)
@ -30,14 +37,14 @@ GEM
multi_json (>= 1.7.5, < 2.0)
nokogiri (~> 1.6.3)
oauth2
hashie (3.4.1)
hashie (3.4.2)
http-cookie (1.0.2)
domain_name (~> 0.5)
json (1.8.2)
jwt (1.5.0)
mime-types (2.5)
json (1.8.3)
jwt (1.5.1)
mime-types (2.6.1)
mini_portile (0.6.2)
multi_json (1.11.0)
multi_json (1.11.2)
multi_xml (0.5.5)
multipart-post (2.0.0)
netrc (0.10.3)
@ -49,32 +56,32 @@ GEM
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (~> 1.2)
parser (2.2.2.2)
parser (2.2.2.6)
ast (>= 1.1, < 3.0)
powerpack (0.1.1)
rack (1.6.1)
rack (1.6.4)
rainbow (2.0.0)
rake (10.4.2)
rest-client (1.8.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 3.0)
netrc (~> 0.7)
rspec (3.2.0)
rspec-core (~> 3.2.0)
rspec-expectations (~> 3.2.0)
rspec-mocks (~> 3.2.0)
rspec-core (3.2.3)
rspec-support (~> 3.2.0)
rspec-expectations (3.2.1)
rspec (3.3.0)
rspec-core (~> 3.3.0)
rspec-expectations (~> 3.3.0)
rspec-mocks (~> 3.3.0)
rspec-core (3.3.2)
rspec-support (~> 3.3.0)
rspec-expectations (3.3.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.2.0)
rspec-mocks (3.2.1)
rspec-support (~> 3.3.0)
rspec-mocks (3.3.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.2.0)
rspec-support (3.2.2)
rubocop (0.31.0)
rspec-support (~> 3.3.0)
rspec-support (3.3.0)
rubocop (0.32.1)
astrolabe (~> 1.3)
parser (>= 2.2.2.1, < 3.0)
parser (>= 2.2.2.5, < 3.0)
powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.4)
@ -84,11 +91,11 @@ GEM
json (~> 1.8)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
term-ansicolor (1.3.0)
term-ansicolor (1.3.2)
tins (~> 1.0)
thor (0.19.1)
thread_safe (0.3.5)
tins (1.5.1)
tins (1.5.4)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.1)
@ -97,11 +104,11 @@ PLATFORMS
ruby
DEPENDENCIES
codeclimate-test-reporter
colorize (>= 0.7.7)
coveralls
github_api (>= 0.12.3)
rake (>= 10.4.2)
rspec
rubocop
simplecov
bundler (~> 1.7)
codeclimate-test-reporter (~> 0.4)
coveralls (~> 0.8)
github_changelog_generator!
rake (~> 10.0)
rspec (~> 3.2)
rubocop (~> 0.31)
simplecov (~> 0.10)

View File

@ -14,12 +14,17 @@
**Closed issues:**
- Issue closed from commit from PR [\#14](https://github.com/skywinder/changelog_test/issues/14)
- Issue, closed by PR [\#12](https://github.com/skywinder/changelog_test/issues/12)
- Issue [\#10](https://github.com/skywinder/changelog_test/issues/10)
- Issue with some other label - Should be in closed issues [\#8](https://github.com/skywinder/changelog_test/issues/8)
## [0.0.4](https://github.com/skywinder/changelog_test/tree/0.0.4) (2015-05-22)
**Merged pull requests:**
- This PR closes 14 from commit [\#15](https://github.com/skywinder/changelog_test/pull/15) ([skywinder](https://github.com/skywinder))
- This PR to close \#12 from body [\#13](https://github.com/skywinder/changelog_test/pull/13) ([skywinder](https://github.com/skywinder))
## [0.0.4](https://github.com/skywinder/changelog_test/tree/0.0.4) (2015-05-22)
[Full Changelog](https://github.com/skywinder/changelog_test/compare/v0.0.3...0.0.4)
**Closed issues:**
@ -31,7 +36,6 @@
- Add automatically generated change log file. [\#5](https://github.com/skywinder/changelog_test/pull/5) ([skywinder](https://github.com/skywinder))
## [v0.0.3](https://github.com/skywinder/changelog_test/tree/v0.0.3) (2015-03-04)
[Full Changelog](https://github.com/skywinder/changelog_test/compare/v0.0.2...v0.0.3)
**Merged pull requests:**
@ -39,7 +43,6 @@
- fix \#3. hotfix. Should appear in v0.0.3 [\#4](https://github.com/skywinder/changelog_test/pull/4) ([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)
**Merged pull requests:**
@ -49,5 +52,4 @@
## [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)*

View File

@ -56,7 +56,7 @@ module GitHubChangelogGenerator
# @param [String] newer_tag Name of the newer tag. Could be nil for `Unreleased` section
# @param [String] older_tag_name Older tag, used for the links. Could be nil for last tag.
# @return [String] Ready and parsed section
def create_log(pull_requests, issues, newer_tag, older_tag_name = nil)
def create_log_for_tag(pull_requests, issues, newer_tag, older_tag_name = nil)
newer_tag_link, newer_tag_name, newer_tag_time = detect_link_tag_time(newer_tag)
github_site = options[:github_site] || "https://github.com"

View File

@ -8,7 +8,7 @@ module GitHubChangelogGenerator
sort_tags_by_date(@filtered_tags)
fetch_issues_and_pr
log = "# Change Log\n\n"
log = "#{@options[:header]}\n\n"
if @options[:unreleased_only]
log += generate_log_between_tags(filtered_tags[0], nil)
@ -54,8 +54,9 @@ module GitHubChangelogGenerator
if issues.any?
issues.each do |issue|
merge_string = get_string_for_issue(issue)
log += "- #{merge_string}\n\n"
log += "- #{merge_string}\n"
end
log += "\n"
end
log
end
@ -78,7 +79,7 @@ module GitHubChangelogGenerator
if newer_tag_name.equal? @options[:unreleased_label]
log += "## [#{newer_tag_name}](#{project_url}/tree/#{newer_tag_link})\n\n"
else
log += "## [#{newer_tag_name}](#{project_url}/tree/#{newer_tag_link}) (#{time_string})\n\n"
log += "## [#{newer_tag_name}](#{project_url}/tree/#{newer_tag_link}) (#{time_string})\n"
end
if @options[:compare_link] && older_tag_link
@ -102,7 +103,7 @@ module GitHubChangelogGenerator
return ""
end
create_log(filtered_pull_requests, filtered_issues, newer_tag, older_tag_name)
create_log_for_tag(filtered_pull_requests, filtered_issues, newer_tag, older_tag_name)
end
# Apply all filters to issues and pull requests

View File

@ -59,6 +59,9 @@ module GitHubChangelogGenerator
opts.on("--issues-label [LABEL]", "Setup custom label for closed-issues section. Default is \"**Closed issues:**\"") do |v|
options[:issue_prefix] = v
end
opts.on("--header-label [LABEL]", "Setup custom header label. Default is \"# Change Log\"") do |v|
options[:header] = v
end
opts.on("--pr-label [LABEL]", "Setup custom label for pull requests section. Default is \"**Merged pull requests:**\"") do |v|
options[:merge_prefix] = v
end
@ -92,7 +95,7 @@ module GitHubChangelogGenerator
opts.on("--[no-]compare-link", "Include compare link (Full Changelog) between older version and newer version. Default is true") do |v|
options[:compare_link] = v
end
opts.on("--include-labels x,y,z", Array, 'Only issues with the specified labels will be included in the changelog. Default is \'bug,enhancement\'') do |list|
opts.on("--include-labels x,y,z", Array, "Only issues with the specified labels will be included in the changelog.") do |list|
options[:include_labels] = list
end
opts.on("--exclude-labels x,y,z", Array, 'Issues with the specified labels will be always excluded from changelog. Default is \'duplicate,question,invalid,wontfix\'') do |list|
@ -162,6 +165,7 @@ module GitHubChangelogGenerator
max_issues: nil,
simple_list: false,
verbose: true,
header: "# Change Log",
merge_prefix: "**Merged pull requests:**",
issue_prefix: "**Closed issues:**",
bug_prefix: "**Fixed bugs:**",

View File

@ -1,3 +1,3 @@
module GitHubChangelogGenerator
VERSION = "1.6.2"
VERSION = "1.7.0"
end