pt-flow 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -0
- data/README.md +3 -0
- data/lib/pt-flow/branch.rb +3 -2
- data/lib/pt-flow/ui.rb +10 -1
- data/lib/pt-flow/version.rb +1 -1
- data/spec/lib/pt-flow/ui_spec.rb +8 -0
- 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: a667cbbf9dbf5c7d6d2e79b14ad4460e4f35d3f6
|
4
|
+
data.tar.gz: 052f3c3ce6cf5bc4e2251ca9a7a0132b3e7be013
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 080d734b5fbe6562fc8310723d62e11694958a4b75b0d617753e1247f20f65a7ff5ba6c3e0e6bcd61cbfbd2c42e70e2753057e8f0f41123c7ef6733d39aa41f9
|
7
|
+
data.tar.gz: a62d96e5a1d068c3c176e276d00a37e6cea90931998a7a316a15288c0a75f2368ba0ee68e0ccd223df51821bf85bfa965820f72ea19b7480522b7328a8b00ec1
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -27,6 +27,9 @@ $ git finish
|
|
27
27
|
# reviewer comments :+1: to approve on github
|
28
28
|
# committer presses merge button on github which delivers task on pivotal tracker
|
29
29
|
|
30
|
+
$ git finish --draft
|
31
|
+
# Opens github pull request screen rather than auto-submitting
|
32
|
+
|
30
33
|
$ git cleanup
|
31
34
|
# cleans up local/remote story branches already merged with current release branch
|
32
35
|
```
|
data/lib/pt-flow/branch.rb
CHANGED
data/lib/pt-flow/ui.rb
CHANGED
@@ -36,7 +36,7 @@ module PT::Flow
|
|
36
36
|
|
37
37
|
def finish
|
38
38
|
run("git push origin #{branch} -u")
|
39
|
-
|
39
|
+
pull_request
|
40
40
|
finish_task(current_task)
|
41
41
|
deliver! if @params.include?('--deliver')
|
42
42
|
end
|
@@ -89,6 +89,15 @@ module PT::Flow
|
|
89
89
|
task_title
|
90
90
|
end
|
91
91
|
|
92
|
+
def pull_request
|
93
|
+
if @params.include?('--draft')
|
94
|
+
pr_url = `hub compare -u #{branch.target}...#{branch}`.chomp + "?expand=1&title=#{URI.escape(task_title)}"
|
95
|
+
run "open #{pr_url}"
|
96
|
+
else
|
97
|
+
run("hub pull-request -b #{branch.target} -h #{repo.user}:#{branch} -m \"#{task_title}\"")
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
92
101
|
def deliver!
|
93
102
|
finished_branch = branch
|
94
103
|
title = task_title
|
data/lib/pt-flow/version.rb
CHANGED
data/spec/lib/pt-flow/ui_spec.rb
CHANGED
@@ -117,6 +117,14 @@ module PT::Flow
|
|
117
117
|
UI.new('finish', ['--deliver'])
|
118
118
|
end
|
119
119
|
end
|
120
|
+
|
121
|
+
context 'given option --draft' do
|
122
|
+
it "pushes the current branch to origin, flags the story as finished, and opens github pull request URL" do
|
123
|
+
UI.any_instance.should_receive(:run).with('git push origin new_feature.this-is-for-comments.4460038 -u')
|
124
|
+
UI.any_instance.should_receive(:run).with('open https://github.com/cookpad/pt-flow/compare/new_feature...new_feature.this-is-for-comments.4460038?expand=1&title=This%20is%20for%20comments%20[Delivers%20%234460038]')
|
125
|
+
UI.new('finish', ['--draft'])
|
126
|
+
end
|
127
|
+
end
|
120
128
|
end
|
121
129
|
end
|
122
130
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pt-flow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jens Balvig
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pt
|