pivotal-github 1.0.8 → 1.0.9

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: 5d039f8d1d57b58263b8a4738a65294636438cae
4
- data.tar.gz: 1218c1afbc685ef1e201a6233fd4d9cbdb42ebd6
3
+ metadata.gz: 7edfc02ec43d1db0604e8c23d5aaae998647d4a0
4
+ data.tar.gz: 3af75ec9f3c920ffc85b6d0f63f390c09edf264f
5
5
  SHA512:
6
- metadata.gz: 9933d2bd69190dddb4c77306e2bae65f11510bcce7db7374cd14c42f0827990ee5c2fb464a5821e0f857b3acae825d6b0e67542dbe8aab259c0009358fdd2438
7
- data.tar.gz: df212357b1f6257e37f07862ed464c940237b1b633e7674a8301be1b42171c6080dba9e7f5e612a3dfc61e669c75fc4e464e62dfd8feaf28c74f1b73d4666efe
6
+ metadata.gz: 997b24125e1c6feae448f4cc7e537a07f171833d19c1690a04e51cf889b406c40c5b6f63ab3b6d559fd36d08d0e12ab16809136859ba71f81e45cbbabb5a7ee4
7
+ data.tar.gz: 51d303e1f43d9ac3e40d047bc6f91d2029f333eb537055eda7a67ddb78a0e7d02efe3354ff7f344c975aab989195bca20d9db9bd8a3145d35c9c6d0afe6bc5e9
data/README.md CHANGED
@@ -115,13 +115,14 @@ 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. (If you decide you don't want to make the pull request after all, just use `git undo` to restore the previous state.)
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.
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
 
122
122
  #### Options
123
123
 
124
124
  Usage: git story-pull-request [options]
125
+ -b, --base-branch <branch> base branch for delivered ids
125
126
  -o, --override override unfinished story warning
126
127
  -h, --help this usage guide
127
128
 
@@ -202,7 +203,7 @@ Here's the process in detail:
202
203
  6. At the GitHub page for the repo, select **Branches** and submit a pull request
203
204
  6. (On OS X, replace the previous two steps with `git story-pull-request`)
204
205
  6. Assign the pull request to Bob at GitHub
205
- 7. On the Pivotal Tracker story, add a comment with the pull request URL, and optionally change the **Owner** to Bob
206
+ 7. On the Pivotal Tracker story, change the **Owner** to Bob
206
207
  8. Continue working, taking care to branch off of the current story branch if its changes are required to continue
207
208
 
208
209
  Rather than immediately submitting a pull request, Alice can also continue by branching off the previous story branch, working on a set of related features, and then issue Bob a pull request for the final branch when she reaches a natural stopping place.
@@ -8,7 +8,8 @@ class StoryPullRequest < FinishedCommand
8
8
  def parser
9
9
  OptionParser.new do |opts|
10
10
  opts.banner = "Usage: git story-pull-request [options]"
11
- opts.on("-b", "--base-branch", "base branch for delivered ids") do |opt|
11
+ opts.on("-b <branch>", "--base-branch <branch>",
12
+ "base branch for delivered ids") do |opt|
12
13
  self.options.base_branch = opt
13
14
  end
14
15
  opts.on("-o", "--override", "override unfinished story warning") do |opt|
@@ -25,6 +26,10 @@ class StoryPullRequest < FinishedCommand
25
26
  "[Delivers ##{id}](#{story_url(id)})"
26
27
  end
27
28
 
29
+ def base_branch
30
+ options.base_branch || 'master'
31
+ end
32
+
28
33
  # Returns a commit message with links to all the delivered stories.
29
34
  def commit_message
30
35
  ids = delivered_ids(`git log #{base_branch}..HEAD`)
@@ -42,8 +47,4 @@ class StoryPullRequest < FinishedCommand
42
47
  end
43
48
 
44
49
  private
45
-
46
- def base_branch
47
- options.base_branch || 'master'
48
- end
49
50
  end
@@ -1,5 +1,5 @@
1
1
  module Pivotal
2
2
  module Github
3
- VERSION = "1.0.8"
3
+ VERSION = "1.0.9"
4
4
  end
5
5
  end
@@ -18,6 +18,11 @@ describe StoryPullRequest do
18
18
  should include '[Delivers #31415926]'
19
19
  end
20
20
 
21
+ describe "base branch override" do
22
+ let(:command) { StoryPullRequest.new(['-b', 'development']) }
23
+ its(:base_branch) { should eq 'development' }
24
+ end
25
+
21
26
  describe "command-line command" do
22
27
  subject { `bin/git-story-pull-request --debug` }
23
28
  it { should_not match /\.git/ }
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.8
4
+ version: 1.0.9
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-20 00:00:00.000000000 Z
11
+ date: 2013-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: git-utils