add verboose for issues

This commit is contained in:
Petr Korolev 2014-12-15 15:24:46 +02:00
parent c697c6be4a
commit 87c6e33335

View File

@ -356,16 +356,22 @@ module GitHubChangelogGenerator
def get_all_issues def get_all_issues
if @options[:verbose] if @options[:verbose]
puts 'Fetching closed issues..' puts "Fetching closed issues...\r"
end end
response = @github.issues.list user: @options[:user], repo: @options[:project], state: 'closed', filter: 'all', labels: nil response = @github.issues.list user: @options[:user], repo: @options[:project], state: 'closed', filter: 'all', labels: nil
issues = [] issues = []
page_i = 0
response.each_page do |page| response.each_page do |page|
print "Fetching closed issues... #{page_i}\r"
page_i += PER_PAGE_NUMBER
pull_requests.concat(page)
issues.concat(page) issues.concat(page)
end end
print "\r"
# remove pull request from issues: # remove pull request from issues:
issues.select! { |x| issues.select! { |x|
x.pull_request == nil x.pull_request == nil