pretify logs
This commit is contained in:
parent
91e14703f1
commit
cd2f14be0f
|
@ -53,10 +53,12 @@ class LogGenerator
|
||||||
issues = @github.pull_requests.list $github_user, $github_repo_name, :state => 'closed'
|
issues = @github.pull_requests.list $github_user, $github_repo_name, :state => 'closed'
|
||||||
json = issues.body
|
json = issues.body
|
||||||
|
|
||||||
json.each { |dict|
|
if @options[:verbose]
|
||||||
# print_json dict
|
puts 'All pull requests:'
|
||||||
# puts "##{dict[:number]} - #{dict[:title]} (#{dict[:closed_at]})"
|
json.each { |dict|
|
||||||
}
|
p "##{dict[:number]} - #{dict[:title]} (#{dict[:closed_at]})"
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
json
|
json
|
||||||
|
|
||||||
|
@ -86,12 +88,12 @@ class LogGenerator
|
||||||
|
|
||||||
def get_all_merged_pull_requests
|
def get_all_merged_pull_requests
|
||||||
json = self.get_all_closed_pull_requests
|
json = self.get_all_closed_pull_requests
|
||||||
puts 'Check if the requests is merged'
|
puts 'Check if the requests is merged... (it can take a while)'
|
||||||
|
|
||||||
json.delete_if { |req|
|
json.delete_if { |req|
|
||||||
merged = self.is_megred(req[:number])
|
merged = self.is_megred(req[:number])
|
||||||
if @options[:verbose]
|
if @options[:verbose]
|
||||||
puts "##{req[:number]} merged #{merged}"
|
puts "##{req[:number]} #{merged ? 'merged' : 'not merged'}"
|
||||||
end
|
end
|
||||||
!merged
|
!merged
|
||||||
}
|
}
|
||||||
|
@ -108,9 +110,4 @@ if __FILE__ == $0
|
||||||
json = log_generator.get_all_merged_pull_requests
|
json = log_generator.get_all_merged_pull_requests
|
||||||
p json.count
|
p json.count
|
||||||
|
|
||||||
# json.each { |dict|
|
|
||||||
# # print_json dict
|
|
||||||
# p "##{dict[:number]} - #{dict[:title]} (#{dict[:closed_at]})"
|
|
||||||
# }
|
|
||||||
|
|
||||||
end
|
end
|
Loading…
Reference in New Issue
Block a user