Skip to content

Commit

Permalink
Fix reply_to_mailinglist: true
Browse files Browse the repository at this point in the history
Variable 'recipient' wasn't being passed through to function get_reply_to_address causing an error.
  • Loading branch information
deepseth committed Jun 6, 2017
1 parent a55f340 commit 9242c2e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/git_commit_notifier/commit_hook.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def add_committer_to_recipient(recipient, committer_email)
end
end

def get_reply_to_address(config, committer_email)
def get_reply_to_address(config, committer_email, recipient)
reply_to_address = config["from"]
if config["reply_to_author"]
reply_to_address = committer_email
Expand Down Expand Up @@ -227,7 +227,7 @@ def run(config_name, rev1, rev2, ref_name)
:recipient => config["send_mail_to_committer"] ? add_committer_to_recipient(recipient, result[:commit_info][:email]) : recipient,
:from_address => config["from"] || result[:commit_info][:email],
:from_alias => result[:commit_info][:author],
:reply_to_address => get_reply_to_address(config, result[:commit_info][:email]),
:reply_to_address => get_reply_to_address(config, result[:commit_info][:email], recipient),
:subject => subject,
:commit_date => result[:commit_info][:date],
:current_date => Time.new.rfc2822,
Expand Down Expand Up @@ -278,7 +278,7 @@ def run(config_name, rev1, rev2, ref_name)
:recipient => config["send_mail_to_committer"] ? add_committer_to_recipient(recipient, result[:commit_info][:email]) : recipient,
:from_address => config["from"] || result[:commit_info][:email],
:from_alias => result[:commit_info][:author],
:reply_to_address => get_reply_to_address(config, result[:commit_info][:email]),
:reply_to_address => get_reply_to_address(config, result[:commit_info][:email], recipient),
:subject => subject,
:commit_date => result[:commit_info][:date],
:current_date => Time.new.rfc2822,
Expand Down

0 comments on commit 9242c2e

Please sign in to comment.