From 1d7f09e9bbfa065d91ede4e0eb88bff79c33e194 Mon Sep 17 00:00:00 2001 From: Petr Korolev Date: Wed, 18 Feb 2015 22:11:11 +0200 Subject: [PATCH] change include to exclude default rule --- lib/github_changelog_generator.rb | 2 +- lib/github_changelog_generator/parser.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/github_changelog_generator.rb b/lib/github_changelog_generator.rb index d9017ac..4455c68 100755 --- a/lib/github_changelog_generator.rb +++ b/lib/github_changelog_generator.rb @@ -502,7 +502,7 @@ module GitHubChangelogGenerator x.pull_request == nil } - filtered_issues = [] + filtered_issues = issues unless @options[:include_labels].nil? filtered_issues = issues.select { |issue| diff --git a/lib/github_changelog_generator/parser.rb b/lib/github_changelog_generator/parser.rb index 487118c..fd27939 100644 --- a/lib/github_changelog_generator/parser.rb +++ b/lib/github_changelog_generator/parser.rb @@ -6,7 +6,7 @@ require_relative 'version' module GitHubChangelogGenerator class Parser def self.parse_options - options = {:tag1 => nil, :tag2 => nil, :format => '%Y-%m-%d', :output => 'CHANGELOG.md', :include_labels => %w(bug enhancement), :exclude_labels => %w(duplicate question invalid wontfix), :pulls => true, :issues => true, :verbose => true, :add_issues_wo_labels => true, :merge_prefix => '*Merged pull-request:* ', :author => true, :pull_request_labels => nil, :filter_issues_by_milestone => true, :compare_link => true, :unreleased => true} + options = {:tag1 => nil, :tag2 => nil, :format => '%Y-%m-%d', :output => 'CHANGELOG.md', :exclude_labels => %w(duplicate question invalid wontfix), :pulls => true, :issues => true, :verbose => true, :add_issues_wo_labels => true, :merge_prefix => '*Merged pull-request:* ', :author => true, :pull_request_labels => nil, :filter_issues_by_milestone => true, :compare_link => true, :unreleased => true} parser = OptionParser.new { |opts| opts.banner = 'Usage: changelog_generator [options]'