Permalink
Browse files

Pull request descriptions: trim carrige returns (Ctrl-M)

Sometimes github returns messages that have ctrl-M at the end, not sure
why, but we don't want that crap.
  • Loading branch information...
1 parent 4d1ce1d commit ec35bd62d3d6347603b1f2b02e44a402d6c66a03 @danielbeardsley danielbeardsley committed Jan 25, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 github.rb
View
@@ -111,7 +111,7 @@ def self.get_pull_request_description(branch_name = nil)
require 'tempfile'
if branch_name
- initial_message = Git::commit_message(branch_name)
+ initial_message = Git::commit_message(branch_name).gsub("\r","")
else
initial_message = <<-MESSAGE
Title of pull-request
@@ -162,9 +162,9 @@ def self.get_pull_request_description_from_api(branch_name, into_branch)
return <<-MSG
Merge #{branch_name} (##{pull[:number]}) into #{into_branch}
-#{pull[:title]}
+#{pull[:title].gsub("\r", '')}
-#{pull[:body]}
+#{pull[:body].gsub("\r", '')}
MSG
else
return "Merge #{branch_name} into #{into_branch}"

0 comments on commit ec35bd6

Please sign in to comment.