From d21651776c10c56d51b43f73a95f96396f72d129 Mon Sep 17 00:00:00 2001 From: Petr Korolev Date: Thu, 16 Jul 2015 14:32:11 +0300 Subject: [PATCH 01/10] fix for #242 --- lib/CHANGELOG.md | 4 ---- .../generator/generator_generation.rb | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/CHANGELOG.md b/lib/CHANGELOG.md index a32e6eb..f44570a 100644 --- a/lib/CHANGELOG.md +++ b/lib/CHANGELOG.md @@ -19,7 +19,6 @@ - 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) - [Full Changelog](https://github.com/skywinder/changelog_test/compare/v0.0.3...0.0.4) **Closed issues:** @@ -31,7 +30,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 +37,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 +46,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)* \ No newline at end of file diff --git a/lib/github_changelog_generator/generator/generator_generation.rb b/lib/github_changelog_generator/generator/generator_generation.rb index 8602c59..d682896 100644 --- a/lib/github_changelog_generator/generator/generator_generation.rb +++ b/lib/github_changelog_generator/generator/generator_generation.rb @@ -78,7 +78,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 From 4de98a7d16d6db852638549309a7aae2f47c75c1 Mon Sep 17 00:00:00 2001 From: Petr Korolev Date: Thu, 16 Jul 2015 14:36:25 +0300 Subject: [PATCH 02/10] fix #242 --- lib/CHANGELOG.md | 1 - .../generator/generator_generation.rb | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/CHANGELOG.md b/lib/CHANGELOG.md index f44570a..1afceb2 100644 --- a/lib/CHANGELOG.md +++ b/lib/CHANGELOG.md @@ -15,7 +15,6 @@ **Closed issues:** - 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) diff --git a/lib/github_changelog_generator/generator/generator_generation.rb b/lib/github_changelog_generator/generator/generator_generation.rb index d682896..3970c20 100644 --- a/lib/github_changelog_generator/generator/generator_generation.rb +++ b/lib/github_changelog_generator/generator/generator_generation.rb @@ -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 From e274f9992a007a1087134018eb77fddaa430884d Mon Sep 17 00:00:00 2001 From: Petr Korolev Date: Thu, 16 Jul 2015 14:47:01 +0300 Subject: [PATCH 03/10] fix #251 --- .rubocop_todo.yml | 4 ++-- lib/github_changelog_generator/generator/generator.rb | 2 +- .../generator/generator_generation.rb | 4 ++-- lib/github_changelog_generator/parser.rb | 4 ++++ 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index d9ddb8c..3b97791 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -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 + Max: 73 # Offense count: 1 Metrics/CyclomaticComplexity: diff --git a/lib/github_changelog_generator/generator/generator.rb b/lib/github_changelog_generator/generator/generator.rb index 61e6061..c6f2a8b 100644 --- a/lib/github_changelog_generator/generator/generator.rb +++ b/lib/github_changelog_generator/generator/generator.rb @@ -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" diff --git a/lib/github_changelog_generator/generator/generator_generation.rb b/lib/github_changelog_generator/generator/generator_generation.rb index 3970c20..7e8f7a2 100644 --- a/lib/github_changelog_generator/generator/generator_generation.rb +++ b/lib/github_changelog_generator/generator/generator_generation.rb @@ -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) @@ -103,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 diff --git a/lib/github_changelog_generator/parser.rb b/lib/github_changelog_generator/parser.rb index 3de8f07..ea9abce 100644 --- a/lib/github_changelog_generator/parser.rb +++ b/lib/github_changelog_generator/parser.rb @@ -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 @@ -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:**", From 68a045da227e8b6c35be73ed8c1d55b7c42108b4 Mon Sep 17 00:00:00 2001 From: Petr Korolev Date: Thu, 16 Jul 2015 15:29:00 +0300 Subject: [PATCH 04/10] fix: fix help message --- .rubocop_todo.yml | 2 +- lib/github_changelog_generator/parser.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 3b97791..8059430 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -7,7 +7,7 @@ # Offense count: 13 Metrics/AbcSize: - Max: 73 + Enabled: false # Offense count: 1 Metrics/CyclomaticComplexity: diff --git a/lib/github_changelog_generator/parser.rb b/lib/github_changelog_generator/parser.rb index ea9abce..f06d452 100644 --- a/lib/github_changelog_generator/parser.rb +++ b/lib/github_changelog_generator/parser.rb @@ -95,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| From f215694ffb742a604b1fd6349c7dff98850241d9 Mon Sep 17 00:00:00 2001 From: Petr Korolev Date: Thu, 16 Jul 2015 15:32:02 +0300 Subject: [PATCH 05/10] update chanhelog --- lib/CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/CHANGELOG.md b/lib/CHANGELOG.md index 1afceb2..c82ce18 100644 --- a/lib/CHANGELOG.md +++ b/lib/CHANGELOG.md @@ -14,9 +14,16 @@ **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) +**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) From a4a6e6dedb3a2389476433610db76242a59696ab Mon Sep 17 00:00:00 2001 From: Petr Korolev Date: Thu, 16 Jul 2015 16:37:50 +0300 Subject: [PATCH 06/10] bundler update --- Gemfile.lock | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index ed27b31..dc5335b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,12 +3,12 @@ GEM 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 +30,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 +49,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 +84,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) From e6d80b0cf0081644ad146d3779a8605098921196 Mon Sep 17 00:00:00 2001 From: Petr Korolev Date: Thu, 16 Jul 2015 17:04:50 +0300 Subject: [PATCH 07/10] update gemfile --- Gemfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index 380384e..762a845 100644 --- a/Gemfile +++ b/Gemfile @@ -1,9 +1,6 @@ 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" From b9593f7c7048117010f432d3513467b31b01e7c0 Mon Sep 17 00:00:00 2001 From: Petr Korolev Date: Thu, 16 Jul 2015 17:18:03 +0300 Subject: [PATCH 08/10] update versions --- Gemfile | 10 +++++----- Gemfile.lock | 13 ++++++++++--- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Gemfile b/Gemfile index 762a845..8452dc5 100644 --- a/Gemfile +++ b/Gemfile @@ -3,9 +3,9 @@ source "https://rubygems.org" 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 diff --git a/Gemfile.lock b/Gemfile.lock index dc5335b..83e9594 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,10 @@ +PATH + remote: . + specs: + github_changelog_generator (1.6.2) + colorize (~> 0.7) + github_api (~> 0.12) + GEM remote: https://rubygems.org/ specs: @@ -97,11 +104,11 @@ PLATFORMS ruby DEPENDENCIES + bundler (~> 1.7) codeclimate-test-reporter - colorize (>= 0.7.7) coveralls - github_api (>= 0.12.3) - rake (>= 10.4.2) + github_changelog_generator! + rake (~> 10.0) rspec rubocop simplecov From 925012049fd3d07e9b4c49beaac68194c8bb1908 Mon Sep 17 00:00:00 2001 From: Petr Korolev Date: Thu, 16 Jul 2015 17:18:36 +0300 Subject: [PATCH 09/10] bundle update --- Gemfile.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 83e9594..001d002 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -105,10 +105,10 @@ PLATFORMS DEPENDENCIES bundler (~> 1.7) - codeclimate-test-reporter - coveralls + codeclimate-test-reporter (~> 0.4) + coveralls (~> 0.8) github_changelog_generator! rake (~> 10.0) - rspec - rubocop - simplecov + rspec (~> 3.2) + rubocop (~> 0.31) + simplecov (~> 0.10) From 016f5e690c07df663297984e5343484e9ba940dd Mon Sep 17 00:00:00 2001 From: Petr Korolev Date: Thu, 16 Jul 2015 17:22:56 +0300 Subject: [PATCH 10/10] Update gemspec to version 1.7.0 --- lib/github_changelog_generator/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/github_changelog_generator/version.rb b/lib/github_changelog_generator/version.rb index 214c6a0..ea32926 100644 --- a/lib/github_changelog_generator/version.rb +++ b/lib/github_changelog_generator/version.rb @@ -1,3 +1,3 @@ module GitHubChangelogGenerator - VERSION = "1.6.2" + VERSION = "1.7.0" end