Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix github merge script to use correct author attribution

Author: @franklinhu
Fixes #178
URL: #178
  • Loading branch information...
commit fc4e60adcdfa09234c99eacbacce44ecbac23382 1 parent 5bae51e
Twitter, Inc authored Franklin Hu committed
Showing with 7 additions and 1 deletion.
  1. +7 −1 bin/git-pull-request.rb
View
8 bin/git-pull-request.rb
@@ -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")
Please sign in to comment.
Something went wrong with that request. Please try again.