story_branch 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/story_branch.rb +9 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c19fcd7d504fbeb3426b609f1e038c1630183ad7
|
4
|
+
data.tar.gz: 5d293e2c5688da00ceb52f1fc7026946b34dcb4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 583e333fbc8e2ef56982509ac0c7e87b99b6811e1611c2935ef55b26fc47613cbe288219b454267eaa76c1c6e32d0c4dd49ab671ea7e3c27b4e870e00ebab5b9
|
7
|
+
data.tar.gz: 870be743a9eccd5c936d38599089f15b58e40bf4443ced13fcae1e3690c12803ec6790fa8424f2af99221c626a24f04d2e858657640fa6a34aeea65061aca947
|
data/lib/story_branch.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
# Dominic Wong <dominic.wong.617@gmail.com>
|
6
6
|
# Gabe Hollombe <gabe@neo.com>
|
7
7
|
#
|
8
|
-
# Version: 0.2.
|
8
|
+
# Version: 0.2.4
|
9
9
|
#
|
10
10
|
# ## Description
|
11
11
|
#
|
@@ -171,6 +171,7 @@ module StoryBranch
|
|
171
171
|
begin
|
172
172
|
puts "Connecting with Pivotal Tracker"
|
173
173
|
@p.get_project
|
174
|
+
|
174
175
|
unless @p.is_current_branch_a_story?
|
175
176
|
puts "Your current branch: '#{GitUtils.current_branch}' is not linked to a Pivotal Tracker story."
|
176
177
|
return
|
@@ -335,7 +336,9 @@ module StoryBranch
|
|
335
336
|
def is_current_branch_a_story?
|
336
337
|
GitUtils.current_story and
|
337
338
|
GitUtils.current_story.length == 3 and
|
338
|
-
|
339
|
+
filtered_stories_list(:started, true).
|
340
|
+
map(&:id).
|
341
|
+
include? GitUtils.current_story[2].to_i
|
339
342
|
end
|
340
343
|
|
341
344
|
def story_from_current_branch
|
@@ -350,7 +353,10 @@ module StoryBranch
|
|
350
353
|
project = get_project
|
351
354
|
stories = project.stories.all({current_state: state})
|
352
355
|
if estimated
|
353
|
-
stories.select{|s|
|
356
|
+
stories.select{|s|
|
357
|
+
s.story_type == "bug" or
|
358
|
+
s.story_type == "chore" or
|
359
|
+
(s.story_type == "feature" and s.estimate and s.estimate >= 0)}
|
354
360
|
else
|
355
361
|
stories
|
356
362
|
end
|