pr-pull: clean up review signoff trailer code
This commit is contained in:
		
							parent
							
								
									e30ed42439
								
							
						
					
					
						commit
						e7b65c62a0
					
				@ -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}."
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user