Merge pull request #8906 from jonchang/tweak-signoff

pr-pull: clean up review signoff trailer code
This commit is contained in:
Jonathan Chang 2020-10-12 22:11:31 +11:00 committed by GitHub
commit 84930afb0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,9 +104,10 @@ module Homebrew
if pr
# This is a tap pull request and approving reviewers should also sign-off.
tap = Tap.from_path(path)
trailers += GitHub.approved_reviews(tap.user, tap.full_name.split("/").last, pr).map do |r|
review_trailers = GitHub.approved_reviews(tap.user, tap.full_name.split("/").last, pr).map do |r|
"Signed-off-by: #{r["name"]} <#{r["email"]}>"
end.join("\n")
end
trailers = trailers.lines.concat(review_trailers).map(&:strip).uniq.join("\n")
# Append the close message as well, unless the commit body already includes it.
close_message = "Closes ##{pr}."