Skip to content

Commit

Permalink
Pull request descriptions: trim carrige returns (Ctrl-M)
Browse files Browse the repository at this point in the history
Sometimes github returns messages that have ctrl-M at the end, not sure
why, but we don't want that crap.
  • Loading branch information
danielbeardsley committed Jan 25, 2013
1 parent 4d1ce1d commit ec35bd6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions github.rb
Expand Up @@ -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
Expand Down Expand Up @@ -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}"
Expand Down

0 comments on commit ec35bd6

Please sign in to comment.