Skip to content

Commit

Permalink
Merge pull request #33 from thejspr/encourage-pr-descriptions
Browse files Browse the repository at this point in the history
Add more incentive to write a good PR description
  • Loading branch information
Pedro Cunha committed Sep 2, 2014
2 parents 319340b + 8d5a458 commit f45a60a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bin/git-pull-request
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
# encoding: UTF-8
#
# git-pull-request --
#
#
# Open a pull request for the current branch in your default browser
#
#
# Assumes the branches are named
# <team>/<branch-title>-<story-id>
#
#
require 'rubygems'
require 'pivotal-tracker'
require 'optparse'
Expand Down Expand Up @@ -58,7 +58,7 @@ class App < Git::Whistles::App
}.join('&')
url = "https://github.com/#{repo}/compare/#{options.to}...#{options.from}?#{query_string}"
puts "Preparing a pull request for branch #{options.from}"

unless launch_browser(url)
log.warn "Sorry, I don't know how to launch a web browser on your system. You can open it yourself and paste this URL:\n#{url}"
end
Expand Down Expand Up @@ -101,7 +101,7 @@ class App < Git::Whistles::App
url =~ /github\.com/ or die "origin does not have a Github URL !"
end
end
end
end


def repo
Expand Down Expand Up @@ -139,7 +139,7 @@ class App < Git::Whistles::App

headline = "Pivotal tracker story [##{story_id}](#{story.url}) in project *#{project.name}*:"
description = story.description.split("\n").map { |line| "> #{line}" }.join("\n")
body = "#{headline}\n\n#{description}"
body = "TODO: describe your changes\n\n===\n\n#{headline}\n\n#{description}"
title = "#{project.name}: #{story.name} [##{story.id}]"
query.merge! :subject => story.name, :"pull_request[body]" => body, :"pull_request[title]" => title
return
Expand Down

0 comments on commit f45a60a

Please sign in to comment.