Merge pull request #20074 from Homebrew/contributions_csv_output
dev-cmd/contributions: improve CSV output.
This commit is contained in:
commit
9540bfe5c4
@ -88,16 +88,21 @@ module Homebrew
|
|||||||
contributions <<
|
contributions <<
|
||||||
"#{Utils.pluralize("time", grand_totals[username].values.sum, include_count: true)} (total)"
|
"#{Utils.pluralize("time", grand_totals[username].values.sum, include_count: true)} (total)"
|
||||||
|
|
||||||
puts [
|
contributions_string = [
|
||||||
"#{username} contributed",
|
"#{username} contributed",
|
||||||
*contributions.to_sentence,
|
*contributions.to_sentence,
|
||||||
"#{time_period(from:, to: args.to)}.",
|
"#{time_period(from:, to: args.to)}.",
|
||||||
].join(" ")
|
].join(" ")
|
||||||
|
if args.csv?
|
||||||
|
$stderr.puts contributions_string
|
||||||
|
else
|
||||||
|
puts contributions_string
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return unless args.csv?
|
return unless args.csv?
|
||||||
|
|
||||||
puts
|
$stderr.puts
|
||||||
puts generate_csv(grand_totals)
|
puts generate_csv(grand_totals)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user