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 +4 -4
- data/README.md +1 -1
- data/lib/pivotal-github/story_pull_request.rb +7 -4
- data/lib/pivotal-github/version.rb +1 -1
- data/spec/commands/story_pull_request_spec.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0153297904674bee8177bc900ba75511e50a7a77
|
4
|
+
data.tar.gz: 43442746d793f8c258712798d5302fdf46459de6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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 "
|
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
|
@@ -13,7 +13,8 @@ describe StoryPullRequest do
|
|
13
13
|
subject { command }
|
14
14
|
|
15
15
|
its(:cmd) { should match /git pull-request/ }
|
16
|
-
its(:
|
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.
|
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-
|
11
|
+
date: 2013-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: git-utils
|