pivotal-github 1.0.10 → 1.0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5ee37c7adebef4d6cbb5c5716c8cd51769d58e8b
4
- data.tar.gz: ac797758f8093b15876b523563e5b3e0968cf92e
3
+ metadata.gz: 0153297904674bee8177bc900ba75511e50a7a77
4
+ data.tar.gz: 43442746d793f8c258712798d5302fdf46459de6
5
5
  SHA512:
6
- metadata.gz: 34f804ea2699b8eae40165063c8323295a28601c6624085715a12e94850d3b16c126e57df2942b4525268a61aca1de26e0d4f2916cc6990bd36fa227327932e1
7
- data.tar.gz: 459cfe8b759904fe11f6bd9667815f65c934f5c6d87da7b4b505b158c9b8dfcb62c41c370e764e44418d7a40779f863f93199cffd7da9336ae4a69b3f871ee3c
6
+ metadata.gz: d8ecaf622b62ce28025740ffd4867286b7621a1da4b4289b5476e25ec26bbd5db7938c5d51e64fd147adf616495c6aa3bfc549460e75d11687435885f93f0d5a
7
+ data.tar.gz: 66c2fe445678ebbd961d9f2cac5ee35cf32e252b0d95aff1760121c915c140c27476ff94557171b46ca090687838262d45b04020aeeed32d5ab1cf11b894583b
data/README.md CHANGED
@@ -115,7 +115,7 @@ Additionally, `git story-merge` accepts any options valid for `git merge`.
115
115
 
116
116
  $ git story-pull-request
117
117
 
118
- `git story-pull-request` issues a `git push-branch` as well (from [git-utils](https://github.com/mhartl/git-utils)), just in case the local branch hasn't yet been pushed up to the remote repository. For reference, it then makes a commit containing a message with links to all the delivered story ids. These ids are determined relative to a base branch; this is `master` by default, but if there have been a series of topic branches then the base branch should be set (using the `-b` option) to the branch of the previous pull request.
118
+ `git story-pull-request` issues a `git push-branch` as well (from [git-utils](https://github.com/mhartl/git-utils)), just in case the local branch hasn't yet been pushed up to the remote repository. For reference, it then makes a commit containing a message with links to all the delivered story ids. These ids are determined relative to a base branch; this is `master` by default, but if there have been a series of topic branches then the base branch should be set (using the `-b` option) to the branch of the previous pull request. The pull request message includes the branch used for the request, so this previous branch can be determined using `git log`.
119
119
 
120
120
  As with `git story-merge`, by default `git story-pull-request` exits with a warning if the most recent commit doesn't finish the story.
121
121
 
@@ -30,8 +30,13 @@ class StoryPullRequest < FinishedCommand
30
30
  options.base_branch || 'master'
31
31
  end
32
32
 
33
+ # Returns a commit message with the branch being used for the pull request.
34
+ def short_message
35
+ "Issue pull request for branch #{story_branch}"
36
+ end
37
+
33
38
  # Returns a commit message with links to all the delivered stories.
34
- def commit_message
39
+ def long_message
35
40
  ids = delivered_ids(`git log #{base_branch}..HEAD`)
36
41
  ids.map { |id| delivers_url(id) }.join("\n")
37
42
  end
@@ -41,10 +46,8 @@ class StoryPullRequest < FinishedCommand
41
46
  Dir.mkdir '.pull_requests' unless File.directory?('.pull_requests')
42
47
  c = ["touch .pull_requests/`date '+%s'`"]
43
48
  c << "git add ."
44
- c << %(git commit -m "Pull request" -m "#{commit_message}")
49
+ c << %(git commit -m "#{short_message}" -m "#{long_message}")
45
50
  c << "git pull-request"
46
51
  c.join("\n")
47
52
  end
48
-
49
- private
50
53
  end
@@ -1,5 +1,5 @@
1
1
  module Pivotal
2
2
  module Github
3
- VERSION = "1.0.10"
3
+ VERSION = "1.0.11"
4
4
  end
5
5
  end
@@ -13,7 +13,8 @@ describe StoryPullRequest do
13
13
  subject { command }
14
14
 
15
15
  its(:cmd) { should match /git pull-request/ }
16
- its(:commit_message) do
16
+ its(:short_message) { should include command.story_branch }
17
+ its(:long_message) do
17
18
  should include '[Delivers #62831853]'
18
19
  should include '[Delivers #31415926]'
19
20
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pivotal-github
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.10
4
+ version: 1.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Hartl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-21 00:00:00.000000000 Z
11
+ date: 2013-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: git-utils