Skip to content

Commit

Permalink
Fix github merge script to use correct author attribution
Browse files Browse the repository at this point in the history
Author: @franklinhu
Fixes #178
URL: #178
  • Loading branch information
Twitter, Inc authored and Franklin Hu committed Oct 15, 2012
1 parent 5bae51e commit fc4e60a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bin/git-pull-request.rb
Expand Up @@ -203,8 +203,14 @@ def merge(number)

commit_msg = merge_commit_msg(pull_request, issue)

# Use the correct author
user_login = head['user']['login']
user_obj = Github.get("users/#{user_login}")
user_name = user_obj['name']
user_email = user_obj['email']

puts "Committing"
Git.commit("-m #{Shellwords.escape(commit_msg)} -e")
Git.commit("--author=\"#{user_name} <#{user_email}>\" -m #{Shellwords.escape(commit_msg)} -e")

puts "Merging temporary branch to master"
Git.run("checkout master")
Expand Down

0 comments on commit fc4e60a

Please sign in to comment.