story_branch 0.7.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +4 -4
- data/docs/index.md +6 -6
- data/lib/story_branch/cli.rb +9 -9
- data/lib/story_branch/commands/{add.rb → configure.rb} +1 -1
- data/lib/story_branch/jira/tracker.rb +2 -0
- data/lib/story_branch/string_utils.rb +1 -1
- data/lib/story_branch/version.rb +1 -1
- data/tools/prep_changelog.rb +6 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4196567f738d9eefe7e9b689bba4a082f3604d41c7e4b198f10295e3f867a0ba
|
4
|
+
data.tar.gz: 4bd0f419c7fce7703c1b5df98d906137bfd6b3c53e400273c59caf8bea923d26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60993c9099b5112018ea6949ad47901bc27349473296ba96590bed89b499d96eea9ad185623d66d16ba28216b71d8efcbbd91131e89cb51e17da370037416eca
|
7
|
+
data.tar.gz: 0a5154411fdb3c53b5efc0e444af8383b9a197e241bb0ffbe0322c38ccf56d92ee5501e1f3b25026aa1b181b10c66736f9fce90fb25a1a3df1d0530defea7729
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
story_branch (0.
|
4
|
+
story_branch (1.0.0)
|
5
5
|
blanket_wrapper (~> 3.0)
|
6
6
|
damerau-levenshtein (~> 1.3)
|
7
7
|
jira-ruby (~> 1.7)
|
@@ -107,7 +107,7 @@ GEM
|
|
107
107
|
strings-ansi (~> 0.1)
|
108
108
|
unicode-display_width (~> 1.5)
|
109
109
|
unicode_utils (~> 1.4)
|
110
|
-
strings-ansi (0.
|
110
|
+
strings-ansi (0.2.0)
|
111
111
|
thor (0.20.3)
|
112
112
|
thread_safe (0.3.6)
|
113
113
|
tty-color (0.5.1)
|
data/README.md
CHANGED
@@ -36,8 +36,8 @@ You can see all the commands available by running
|
|
36
36
|
$ story_branch -h
|
37
37
|
|
38
38
|
Commands:
|
39
|
-
story_branch
|
40
|
-
story_branch create # Create branch from
|
39
|
+
story_branch configure # Configure a new story branch configuration
|
40
|
+
story_branch create # Create branch from a ticket in the tracker
|
41
41
|
story_branch finish # Creates a git commit message for the staged changes with a [Finishes] tag
|
42
42
|
story_branch help [COMMAND] # Describe available commands or one specific command
|
43
43
|
story_branch migrate # Migrate old story branch configuration to the new format
|
@@ -119,14 +119,14 @@ the full list.
|
|
119
119
|
|
120
120
|
## Configuring PivotalTracker
|
121
121
|
|
122
|
-
When running the command `story_branch
|
122
|
+
When running the command `story_branch configure` you'll be asked 3 things:
|
123
123
|
1. tracker - You should select Pivotal Tracker
|
124
124
|
2. project id - This can be fetched from the PivotalTracker url. E.g in the url `https://www.pivotaltracker.com/n/projects/651417`, the project id would be `651417`
|
125
125
|
3. api key - this is your personal api key. You can get that from [your profile page](https://www.pivotaltracker.com/profile)
|
126
126
|
|
127
127
|
## Configuring Github
|
128
128
|
|
129
|
-
When running the command `story_branch
|
129
|
+
When running the command `story_branch configure` you'll be asked 3 things:
|
130
130
|
1. project id - This is the github repository name in the format `<owner>/<repo_name>`. E.g. `story-branch/story_branch`.
|
131
131
|
2. tracker - You should select Github
|
132
132
|
3. api key - this is your personal api token. You can create one under your
|
data/docs/index.md
CHANGED
@@ -33,13 +33,13 @@ You can see all the commands available by running
|
|
33
33
|
$ story_branch -h
|
34
34
|
|
35
35
|
Commands:
|
36
|
-
story_branch
|
37
|
-
story_branch create # Create branch from
|
36
|
+
story_branch configure # Setup story branch with a new/existing project
|
37
|
+
story_branch create # Create branch from a ticket in the tracker
|
38
38
|
story_branch finish # Creates a git commit message for the staged changes with a [Finishes] tag
|
39
39
|
story_branch help [COMMAND] # Describe available commands or one specific command
|
40
40
|
story_branch migrate # Migrate old story branch configuration to the new format
|
41
|
-
story_branch start # Mark an estimated story as started
|
42
|
-
story_branch unstart # Mark a started story as un-started
|
41
|
+
story_branch start # Mark an estimated story as started [Only for Pivotal Tracker]
|
42
|
+
story_branch unstart # Mark a started story as un-started [Only for Pivotal Tracker]
|
43
43
|
story_branch version # story_branch gem version
|
44
44
|
```
|
45
45
|
|
@@ -116,14 +116,14 @@ the full list.
|
|
116
116
|
|
117
117
|
## Configuring PivotalTracker
|
118
118
|
|
119
|
-
When running the command `story_branch
|
119
|
+
When running the command `story_branch configure` you'll be asked 3 things:
|
120
120
|
1. tracker - You should select Pivotal Tracker
|
121
121
|
2. project id - This can be fetched from the PivotalTracker url. E.g in the url `https://www.pivotaltracker.com/n/projects/651417`, the project id would be `651417`
|
122
122
|
3. api key - this is your personal api key. You can get that from [your profile page](https://www.pivotaltracker.com/profile)
|
123
123
|
|
124
124
|
## Configuring Github
|
125
125
|
|
126
|
-
When running the command `story_branch
|
126
|
+
When running the command `story_branch configure` you'll be asked 3 things:
|
127
127
|
1. project id - This is the github repository name in the format `<owner>/<repo_name>`. E.g. `story-branch/story_branch`.
|
128
128
|
2. tracker - You should select Github
|
129
129
|
3. api key - this is your personal api token. You can create one under your
|
data/lib/story_branch/cli.rb
CHANGED
@@ -18,7 +18,7 @@ module StoryBranch
|
|
18
18
|
end
|
19
19
|
map %w[--version -v] => :version
|
20
20
|
|
21
|
-
desc 'open_issue', '
|
21
|
+
desc 'open_issue', 'Open ticket in the configured tracker'
|
22
22
|
method_option :help, aliases: '-h', type: :boolean,
|
23
23
|
desc: 'Display usage information'
|
24
24
|
def open_issue(*)
|
@@ -30,7 +30,7 @@ module StoryBranch
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
-
desc 'unstart', 'Mark a started story as un-started
|
33
|
+
desc 'unstart', 'Mark a started story as un-started [Only for Pivotal Tracker]'
|
34
34
|
method_option :help, aliases: '-h', type: :boolean,
|
35
35
|
desc: 'Display usage information'
|
36
36
|
def unstart(*)
|
@@ -42,7 +42,7 @@ module StoryBranch
|
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
|
-
desc 'start', 'Mark an estimated story as started
|
45
|
+
desc 'start', 'Mark an estimated story as started [Only for Pivotal Tracker]'
|
46
46
|
method_option :help, aliases: '-h', type: :boolean,
|
47
47
|
desc: 'Display usage information'
|
48
48
|
def start(*)
|
@@ -67,7 +67,7 @@ module StoryBranch
|
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
70
|
-
desc 'create', 'Create branch from
|
70
|
+
desc 'create', 'Create branch from a ticket in the tracker'
|
71
71
|
method_option :help, aliases: '-h', type: :boolean,
|
72
72
|
desc: 'Display usage information'
|
73
73
|
def create(*)
|
@@ -79,15 +79,15 @@ module StoryBranch
|
|
79
79
|
end
|
80
80
|
end
|
81
81
|
|
82
|
-
desc '
|
82
|
+
desc 'configure', 'Setup story branch with a new/existing project'
|
83
83
|
method_option :help, aliases: '-h', type: :boolean,
|
84
84
|
desc: 'Display usage information'
|
85
|
-
def
|
85
|
+
def configure(*)
|
86
86
|
if options[:help]
|
87
|
-
invoke :help, ['
|
87
|
+
invoke :help, ['configure']
|
88
88
|
else
|
89
|
-
require_relative 'commands/
|
90
|
-
StoryBranch::Commands::
|
89
|
+
require_relative 'commands/configure'
|
90
|
+
StoryBranch::Commands::Configure.new(options).execute
|
91
91
|
end
|
92
92
|
end
|
93
93
|
end
|
@@ -12,7 +12,7 @@ module StoryBranch
|
|
12
12
|
#
|
13
13
|
# It will try to load the existing global story branch config
|
14
14
|
# and then add the project id specified by the user.
|
15
|
-
class
|
15
|
+
class Configure < StoryBranch::Command
|
16
16
|
def initialize(_options)
|
17
17
|
@new_config = ConfigManager.new
|
18
18
|
end
|
@@ -11,7 +11,7 @@ module StoryBranch
|
|
11
11
|
undef: :replace, # Replace anything not defined in ASCII
|
12
12
|
replace: '-' # Use a dash for those replacements
|
13
13
|
}
|
14
|
-
res.encode(Encoding.find('ASCII'), encoding_options)
|
14
|
+
res.encode(Encoding.find('ASCII'), **encoding_options)
|
15
15
|
end
|
16
16
|
|
17
17
|
def self.dashed(text)
|
data/lib/story_branch/version.rb
CHANGED
data/tools/prep_changelog.rb
CHANGED
@@ -26,10 +26,13 @@ def print_all_logs
|
|
26
26
|
puts cleanup_tags
|
27
27
|
|
28
28
|
cleanup_tags.each_with_index do |tag, idx|
|
29
|
-
next if idx + 1 >= cleanup_tags.length
|
30
|
-
|
31
29
|
from = tag[:tag]
|
32
|
-
|
30
|
+
if idx + 1 == cleanup_tags.length
|
31
|
+
to = 'HEAD'
|
32
|
+
else
|
33
|
+
from = tag[:tag]
|
34
|
+
to = cleanup_tags[idx + 1][:tag]
|
35
|
+
end
|
33
36
|
grab_and_print_log(from, to)
|
34
37
|
end
|
35
38
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: story_branch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rui Baltazar
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: exe
|
14
14
|
cert_chain: []
|
15
|
-
date: 2020-
|
15
|
+
date: 2020-07-12 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: blanket_wrapper
|
@@ -333,7 +333,7 @@ files:
|
|
333
333
|
- lib/story_branch/cli.rb
|
334
334
|
- lib/story_branch/command.rb
|
335
335
|
- lib/story_branch/commands/.gitkeep
|
336
|
-
- lib/story_branch/commands/
|
336
|
+
- lib/story_branch/commands/configure.rb
|
337
337
|
- lib/story_branch/commands/create.rb
|
338
338
|
- lib/story_branch/commands/finish.rb
|
339
339
|
- lib/story_branch/commands/open_issue.rb
|