From 6a732ceb992667fbcecf6205efd2d5339d273fae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Pinson?= Date: Thu, 27 Aug 2015 13:30:16 +0200 Subject: [PATCH 1/2] Do not alter pull_requests while iterating on it Deleting elements of an array while iterating on it results in never seeing the last element. > a = [1,2,3] => [1, 2, 3] > a.each do |e| > p a > a.delete(e) > end [1, 2, 3] [2, 3] => [2] --- lib/github_changelog_generator/generator/generator.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/github_changelog_generator/generator/generator.rb b/lib/github_changelog_generator/generator/generator.rb index 2145766..68b6266 100644 --- a/lib/github_changelog_generator/generator/generator.rb +++ b/lib/github_changelog_generator/generator/generator.rb @@ -120,22 +120,22 @@ module GitHubChangelogGenerator issues_a.push dict unless added end + added_pull_requests = [] pull_requests.each do |dict| - added = false dict.labels.each do |label| if @options[:bug_labels].include? label.name bugs_a.push dict - added = true + added_pull_requests.push dict next end if @options[:enhancement_labels].include? label.name enhancement_a.push dict - added = true + added_pull_requests.push dict next end end - pull_requests.delete(dict) if added end + added_pull_requests.each { |p| pull_requests.delete(p) } [bugs_a, enhancement_a, issues_a] end From f718a82af1018a6c0fb2bfe37b6051bcda49a338 Mon Sep 17 00:00:00 2001 From: Petr Korolev Date: Mon, 31 Aug 2015 15:42:20 +0300 Subject: [PATCH 2/2] Update changelog for version 1.8.3 --- CHANGELOG.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e05a58c..bc4d196 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## [1.8.3](https://github.com/skywinder/github-changelog-generator/tree/1.8.3) (2015-08-31) +[Full Changelog](https://github.com/skywinder/github-changelog-generator/compare/1.8.2...1.8.3) + +**Merged pull requests:** + +- Do not alter pull\_requests while iterating on it [\#271](https://github.com/skywinder/github-changelog-generator/pull/271) ([raphink](https://github.com/raphink)) + ## [1.8.2](https://github.com/skywinder/github-changelog-generator/tree/1.8.2) (2015-08-26) [Full Changelog](https://github.com/skywinder/github-changelog-generator/compare/1.8.1...1.8.2) @@ -241,16 +248,13 @@ **Implemented enhancements:** - Use milestone to specify in which version bug was fixed [\#22](https://github.com/skywinder/github-changelog-generator/issues/22) +- support enterprise github via command line options [\#42](https://github.com/skywinder/github-changelog-generator/pull/42) ([glenlovett](https://github.com/glenlovett)) **Fixed bugs:** - Error when trying to generate log for repo without tags [\#32](https://github.com/skywinder/github-changelog-generator/issues/32) - PrettyPrint class is included using lowercase 'pp' [\#43](https://github.com/skywinder/github-changelog-generator/pull/43) ([schwing](https://github.com/schwing)) -**Merged pull requests:** - -- support enterprise github via command line options [\#42](https://github.com/skywinder/github-changelog-generator/pull/42) ([glenlovett](https://github.com/glenlovett)) - ## [1.2.4](https://github.com/skywinder/github-changelog-generator/tree/1.2.4) (2014-12-16) [Full Changelog](https://github.com/skywinder/github-changelog-generator/compare/1.2.3...1.2.4)