From fd2beef12a472d5834894ad711261ddeb124dd20 Mon Sep 17 00:00:00 2001 From: tuexss Date: Fri, 27 Mar 2015 00:16:35 +0100 Subject: [PATCH] Set default for include labels --- lib/github_changelog_generator.rb | 4 ++-- lib/github_changelog_generator/parser.rb | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/github_changelog_generator.rb b/lib/github_changelog_generator.rb index b38bc6c..e419093 100755 --- a/lib/github_changelog_generator.rb +++ b/lib/github_changelog_generator.rb @@ -150,7 +150,7 @@ module GitHubChangelogGenerator unless @options[:include_labels].nil? filtered_pull_requests = @pull_requests.select { |issue| - # add all labels from @options[:incluse_labels] array + # add all labels from @options[:include_labels] array (issue.labels.map(&:name) & @options[:include_labels]).any? } end @@ -518,7 +518,7 @@ module GitHubChangelogGenerator unless @options[:include_labels].nil? filtered_issues = issues.select { |issue| - # add all labels from @options[:incluse_labels] array + # add all labels from @options[:include_labels] array (issue.labels.map(&:name) & @options[:include_labels]).any? } end diff --git a/lib/github_changelog_generator/parser.rb b/lib/github_changelog_generator/parser.rb index b4a3923..4856d8b 100644 --- a/lib/github_changelog_generator/parser.rb +++ b/lib/github_changelog_generator/parser.rb @@ -11,6 +11,7 @@ module GitHubChangelogGenerator 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,