Add --max-issues argument to limit requests
This addresses issue 71 by providing a configurable limit on the number of issues to retrieve. By default this limits the number of issues to 500 which should help users stay under the GitHub API limit and keep change logs from growing ridiculous in size for older repos.
This commit is contained in:
@@ -24,6 +24,7 @@ module GitHubChangelogGenerator
|
||||
:enhancement_prefix => '**Implemented enhancements:**',
|
||||
:author => true,
|
||||
:filter_issues_by_milestone => true,
|
||||
:max_issues => 500,
|
||||
:compare_link => true,
|
||||
:unreleased => true,
|
||||
:unreleased_label => 'Unreleased',
|
||||
@@ -83,6 +84,9 @@ module GitHubChangelogGenerator
|
||||
opts.on('--exclude-labels x,y,z', Array, 'Issues with that labels will be always excluded from changelog. Default is \'duplicate,question,invalid,wontfix\'') do |list|
|
||||
options[:exclude_labels] = list
|
||||
end
|
||||
opts.on('--max-issues [NUMBER]', Integer, 'Max number of issues to fetch from GitHub. Default is 500') do |max|
|
||||
options[:max_issues] = max
|
||||
end
|
||||
opts.on('--github-site [URL]', 'The Enterprise Github site on which your project is hosted.') do |last|
|
||||
options[:github_site] = last
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user