Merge branch 'new-features'

This commit is contained in:
Petr Korolev 2014-11-19 15:59:39 +02:00
commit 36fbe509fa

View File

@ -6,7 +6,7 @@ require_relative 'version'
module GitHubChangelogGenerator module GitHubChangelogGenerator
class Parser class Parser
def self.parse_options def self.parse_options
options = {:tag1 => nil, :tag2 => nil, :format => '%d/%m/%y', :output => 'CHANGELOG.md', :labels => %w(bug enhancement), :pulls => true, :issues => true, :verbose => true, :add_issues_wo_labels => true, :merge_prefix => '*Merged pull-request:* ', :author => true, :pull_request_labels => %w(bug enhancement)} options = {:tag1 => nil, :tag2 => nil, :format => '%d/%m/%y', :output => 'CHANGELOG.md', :labels => %w(bug enhancement), :pulls => true, :issues => true, :verbose => true, :add_issues_wo_labels => true, :merge_prefix => '*Merged pull-request:* ', :author => true}
parser = OptionParser.new { |opts| parser = OptionParser.new { |opts|
opts.banner = 'Usage: changelog_generator [options]' opts.banner = 'Usage: changelog_generator [options]'
@ -50,7 +50,7 @@ module GitHubChangelogGenerator
opts.on('--labels x,y,z', Array, 'Issues with that labels will be included to changelog. Default is \'bug,enhancement\'') do |list| opts.on('--labels x,y,z', Array, 'Issues with that labels will be included to changelog. Default is \'bug,enhancement\'') do |list|
options[:labels] = list options[:labels] = list
end end
opts.on('--filter-pull-requests x,y,z', Array, 'Pull requests with that labels will be included to changelog. pull requests w\o labels will be included anyway. Default is \'bug,enhancement\'') do |list| opts.on('--[no-]filter-pull-requests x,y,z', Array, 'Pull requests with that labels will be included to changelog. pull requests w\o labels will be included anyway.') do |list|
options[:pull_request_labels] = list options[:pull_request_labels] = list
end end
opts.on('-v', '--version', 'Print version number') do |v| opts.on('-v', '--version', 'Print version number') do |v|