pivotal-stories 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +7 -5
- data/VERSION +1 -1
- data/bin/story +14 -3
- metadata +3 -3
data/README.rdoc
CHANGED
@@ -12,8 +12,10 @@ Description goes here.
|
|
12
12
|
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
13
13
|
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
15
|
+
story -h
|
16
|
+
Usage: story [options]
|
17
|
+
-v, --version Version
|
18
|
+
-b, --branch [BRANCH_NAME] List the branch of the started stories. With BRANCH_NAME update the branch for the story.
|
19
|
+
-B BRANCH_NAME Update the branch name of the story with BRANCH_NAME and creates a git branch with the name BRANCH_NAME.
|
20
|
+
--branch_with_git
|
21
|
+
-l, --labels Labels of the started stories
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.3
|
data/bin/story
CHANGED
@@ -17,6 +17,11 @@ opts.on("-b", "--branch [BRANCH_NAME]", "List the branch of the started stories.
|
|
17
17
|
options[:disp_branch] = v || 1
|
18
18
|
end
|
19
19
|
|
20
|
+
opts.on("-B", "--branch_with_git BRANCH_NAME", "Update the branch name of the story with BRANCH_NAME and creates a git branch with the name BRANCH_NAME. ") do |v|
|
21
|
+
options[:disp_branch] = v
|
22
|
+
options[:git_branch] = v
|
23
|
+
end
|
24
|
+
|
20
25
|
opts.on("-l", "--labels", "Labels of the started stories") do |v|
|
21
26
|
options[:disp_labels] = 1
|
22
27
|
end
|
@@ -34,8 +39,6 @@ PivotalTracker::Client.token = conf["api-token"]
|
|
34
39
|
|
35
40
|
@stories.each do |story|
|
36
41
|
|
37
|
-
|
38
|
-
|
39
42
|
puts "[##{story.id}] #{story.name}"
|
40
43
|
puts "[Fixes ##{story.id}] #{story.name}"
|
41
44
|
|
@@ -56,13 +59,21 @@ PivotalTracker::Client.token = conf["api-token"]
|
|
56
59
|
story.update :labels => (labels << "b_#{options[:disp_branch]}").join(',')
|
57
60
|
end
|
58
61
|
end
|
59
|
-
|
60
62
|
labels = story.labels
|
61
63
|
labels ||= ""
|
62
64
|
labels = labels.split(",")
|
63
65
|
branches = labels.map{|l| unless (l =~ /^b_/).nil? then l end }.compact.join(',')
|
64
66
|
puts "Branches: #{branches.sub(/b_/,'')}"
|
65
67
|
end
|
68
|
+
|
69
|
+
if options[:git_branch]
|
70
|
+
cmd = "git branch #{options[:git_branch]} master"
|
71
|
+
if system cmd
|
72
|
+
puts "git branch #{options[:git_branch]} created"
|
73
|
+
end
|
74
|
+
system "git checkout #{options[:git_branch]}"
|
75
|
+
end
|
76
|
+
|
66
77
|
puts
|
67
78
|
end
|
68
79
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pivotal-stories
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 3
|
10
|
+
version: 0.3.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Caccinolo Benoit
|