story_branch 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/weekly-digest.yml +7 -0
- data/.gitignore +1 -0
- data/.rubocop.yml +42 -0
- data/.ruby-version +1 -1
- data/Gemfile.lock +44 -93
- data/README.md +10 -4
- data/lib/story_branch/commands/add.rb +0 -2
- data/lib/story_branch/git_wrapper.rb +1 -1
- data/lib/story_branch/github/issue.rb +1 -3
- data/lib/story_branch/github/label.rb +1 -0
- data/lib/story_branch/jira/issue.rb +1 -1
- data/lib/story_branch/jira/tracker.rb +0 -2
- data/lib/story_branch/main.rb +6 -12
- data/lib/story_branch/version.rb +1 -1
- data/story_branch.gemspec +4 -4
- data/tools/prep_changelog.rb +45 -0
- metadata +21 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb75bb1f32ca84983e87fb92d97f5e49d5639d186989a456ae94495d6b68854e
|
4
|
+
data.tar.gz: aea71dc4c13e83f1b2eed1df1b0107b80ba87e8e0248edc2cd5a4e24868c0567
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5407dbbd33c208b33286f4aa0ea0fa9efa566e2683204e2ef0ece08e8ca674424326c7e08612124d41fb52d5dbf2550004379fafde72df1bebb6b1bd213ef3a9
|
7
|
+
data.tar.gz: 402a42e1e29186a4f500c5c85f440f386aa76a329211c28f13404286ed6d0795b99a114b0fe7435afd7d6f0ebfa249fb289ddb0ccb2858609cf7c037c6e9e4a0
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -7,3 +7,45 @@ AllCops:
|
|
7
7
|
- 'exe/*'
|
8
8
|
- '**/Gemfile'
|
9
9
|
- '.github/**/*'
|
10
|
+
|
11
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
12
|
+
Enabled: true
|
13
|
+
|
14
|
+
Layout/SpaceAroundMethodCallOperator:
|
15
|
+
Enabled: true
|
16
|
+
|
17
|
+
Lint/DeprecatedOpenSSLConstant:
|
18
|
+
Enabled: true
|
19
|
+
|
20
|
+
Lint/MixedRegexpCaptureTypes:
|
21
|
+
Enabled: true
|
22
|
+
|
23
|
+
Lint/RaiseException:
|
24
|
+
Enabled: true
|
25
|
+
|
26
|
+
Lint/StructNewOverride:
|
27
|
+
Enabled: true
|
28
|
+
|
29
|
+
Style/ExponentialNotation:
|
30
|
+
Enabled: true
|
31
|
+
|
32
|
+
Style/HashEachMethods:
|
33
|
+
Enabled: true
|
34
|
+
|
35
|
+
Style/HashTransformKeys:
|
36
|
+
Enabled: true
|
37
|
+
|
38
|
+
Style/HashTransformValues:
|
39
|
+
Enabled: true
|
40
|
+
|
41
|
+
Style/RedundantFetchBlock:
|
42
|
+
Enabled: true
|
43
|
+
|
44
|
+
Style/RedundantRegexpCharacterClass:
|
45
|
+
Enabled: true
|
46
|
+
|
47
|
+
Style/RedundantRegexpEscape:
|
48
|
+
Enabled: true
|
49
|
+
|
50
|
+
Style/SlicingWithRange:
|
51
|
+
Enabled: true
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.7.1
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
story_branch (0.7.
|
4
|
+
story_branch (0.7.2)
|
5
5
|
blanket_wrapper (~> 3.0)
|
6
6
|
damerau-levenshtein (~> 1.3)
|
7
7
|
jira-ruby (~> 1.7)
|
@@ -15,57 +15,62 @@ PATH
|
|
15
15
|
GEM
|
16
16
|
remote: https://rubygems.org/
|
17
17
|
specs:
|
18
|
-
activesupport (6.0.2
|
18
|
+
activesupport (6.0.3.2)
|
19
19
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
20
20
|
i18n (>= 0.7, < 2)
|
21
21
|
minitest (~> 5.1)
|
22
22
|
tzinfo (~> 1.1)
|
23
|
-
zeitwerk (~> 2.2)
|
23
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
24
|
+
ast (2.4.1)
|
24
25
|
atlassian-jwt (0.2.0)
|
25
26
|
jwt (~> 2.1.0)
|
26
27
|
blanket_wrapper (3.0.2)
|
27
28
|
httparty
|
28
29
|
recursive-open-struct
|
29
30
|
coderay (1.1.2)
|
30
|
-
concurrent-ruby (1.1.
|
31
|
+
concurrent-ruby (1.1.6)
|
31
32
|
damerau-levenshtein (1.3.2)
|
32
33
|
diff-lcs (1.3)
|
33
34
|
docile (1.3.1)
|
34
35
|
equatable (0.6.1)
|
35
36
|
fakefs (0.20.1)
|
36
37
|
git (1.5.0)
|
37
|
-
httparty (0.
|
38
|
+
httparty (0.18.1)
|
38
39
|
mime-types (~> 3.0)
|
39
40
|
multi_xml (>= 0.5.2)
|
40
|
-
i18n (1.8.
|
41
|
+
i18n (1.8.3)
|
41
42
|
concurrent-ruby (~> 1.0)
|
42
|
-
jira-ruby (1.
|
43
|
+
jira-ruby (1.8.0)
|
43
44
|
activesupport
|
44
45
|
atlassian-jwt
|
45
46
|
multipart-post
|
46
47
|
oauth (~> 0.5, >= 0.5.0)
|
47
48
|
json (2.1.0)
|
48
49
|
jwt (2.1.0)
|
49
|
-
kramdown (1.16.2)
|
50
50
|
method_source (0.9.2)
|
51
51
|
mime-types (3.3.1)
|
52
52
|
mime-types-data (~> 3.2015)
|
53
|
-
mime-types-data (3.
|
54
|
-
minitest (5.14.
|
53
|
+
mime-types-data (3.2020.0512)
|
54
|
+
minitest (5.14.1)
|
55
55
|
multi_xml (0.6.0)
|
56
56
|
multipart-post (2.1.1)
|
57
57
|
necromancer (0.5.1)
|
58
58
|
oauth (0.5.4)
|
59
59
|
ostruct (0.1.0)
|
60
|
-
|
60
|
+
parallel (1.19.2)
|
61
|
+
parser (2.7.1.4)
|
62
|
+
ast (~> 2.4.1)
|
63
|
+
pastel (0.7.4)
|
61
64
|
equatable (~> 0.6)
|
62
65
|
tty-color (~> 0.5)
|
63
66
|
pry (0.12.2)
|
64
67
|
coderay (~> 1.1.0)
|
65
68
|
method_source (~> 0.9.0)
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
+
rainbow (3.0.0)
|
70
|
+
rake (12.3.3)
|
71
|
+
recursive-open-struct (1.1.2)
|
72
|
+
regexp_parser (1.7.1)
|
73
|
+
rexml (3.2.4)
|
69
74
|
rspec (3.9.0)
|
70
75
|
rspec-core (~> 3.9.0)
|
71
76
|
rspec-expectations (~> 3.9.0)
|
@@ -81,6 +86,18 @@ GEM
|
|
81
86
|
rspec-support (3.9.2)
|
82
87
|
rspec_junit_formatter (0.4.1)
|
83
88
|
rspec-core (>= 2, < 4, != 2.12.0)
|
89
|
+
rubocop (0.86.0)
|
90
|
+
parallel (~> 1.10)
|
91
|
+
parser (>= 2.7.0.1)
|
92
|
+
rainbow (>= 2.2.2, < 4.0)
|
93
|
+
regexp_parser (>= 1.7)
|
94
|
+
rexml
|
95
|
+
rubocop-ast (>= 0.0.3, < 1.0)
|
96
|
+
ruby-progressbar (~> 1.7)
|
97
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
98
|
+
rubocop-ast (0.0.3)
|
99
|
+
parser (>= 2.7.0.1)
|
100
|
+
ruby-progressbar (1.10.1)
|
84
101
|
simplecov (0.16.1)
|
85
102
|
docile (~> 1.1)
|
86
103
|
json (>= 1.8, < 3)
|
@@ -93,71 +110,15 @@ GEM
|
|
93
110
|
strings-ansi (0.1.0)
|
94
111
|
thor (0.20.3)
|
95
112
|
thread_safe (0.3.6)
|
96
|
-
tty (0.10.0)
|
97
|
-
bundler (~> 1.16, < 2.0)
|
98
|
-
equatable (~> 0.5)
|
99
|
-
pastel (~> 0.7.2)
|
100
|
-
thor (~> 0.20.0)
|
101
|
-
tty-box (~> 0.4.1)
|
102
|
-
tty-color (~> 0.5)
|
103
|
-
tty-command (~> 0.9.0)
|
104
|
-
tty-config (~> 0.3.2)
|
105
|
-
tty-cursor (~> 0.7)
|
106
|
-
tty-editor (~> 0.5)
|
107
|
-
tty-file (~> 0.8.0)
|
108
|
-
tty-font (~> 0.4.0)
|
109
|
-
tty-logger (~> 0.2.0)
|
110
|
-
tty-markdown (~> 0.6.0)
|
111
|
-
tty-pager (~> 0.12)
|
112
|
-
tty-pie (~> 0.3.0)
|
113
|
-
tty-platform (~> 0.2)
|
114
|
-
tty-progressbar (~> 0.17)
|
115
|
-
tty-prompt (~> 0.19)
|
116
|
-
tty-screen (~> 0.7)
|
117
|
-
tty-spinner (~> 0.9)
|
118
|
-
tty-table (~> 0.11.0)
|
119
|
-
tty-tree (~> 0.3)
|
120
|
-
tty-which (~> 0.4)
|
121
|
-
tty-box (0.4.1)
|
122
|
-
pastel (~> 0.7.2)
|
123
|
-
strings (~> 0.1.6)
|
124
|
-
tty-cursor (~> 0.7)
|
125
113
|
tty-color (0.5.1)
|
126
114
|
tty-command (0.9.0)
|
127
115
|
pastel (~> 0.7.0)
|
128
116
|
tty-config (0.3.2)
|
129
|
-
tty-cursor (0.7.
|
130
|
-
tty-
|
131
|
-
|
132
|
-
tty-
|
133
|
-
tty-
|
134
|
-
diff-lcs (~> 1.3)
|
135
|
-
pastel (~> 0.7.2)
|
136
|
-
tty-prompt (~> 0.18)
|
137
|
-
tty-font (0.4.0)
|
138
|
-
tty-logger (0.2.0)
|
139
|
-
pastel (~> 0.7.0)
|
140
|
-
tty-markdown (0.6.0)
|
141
|
-
kramdown (~> 1.16.2)
|
142
|
-
pastel (~> 0.7.2)
|
143
|
-
rouge (~> 3.3)
|
144
|
-
strings (~> 0.1.4)
|
145
|
-
tty-color (~> 0.4)
|
146
|
-
tty-screen (~> 0.6)
|
147
|
-
tty-pager (0.12.1)
|
148
|
-
strings (~> 0.1.4)
|
149
|
-
tty-screen (~> 0.6)
|
150
|
-
tty-which (~> 0.4)
|
151
|
-
tty-pie (0.3.0)
|
152
|
-
pastel (~> 0.7.3)
|
153
|
-
tty-cursor (~> 0.7)
|
154
|
-
tty-platform (0.3.0)
|
155
|
-
tty-progressbar (0.17.0)
|
156
|
-
strings-ansi (~> 0.1.0)
|
157
|
-
tty-cursor (~> 0.7)
|
158
|
-
tty-screen (~> 0.7)
|
159
|
-
unicode-display_width (~> 1.6)
|
160
|
-
tty-prompt (0.20.0)
|
117
|
+
tty-cursor (0.7.1)
|
118
|
+
tty-pager (0.13.0)
|
119
|
+
strings (~> 0.1.8)
|
120
|
+
tty-screen (~> 0.8)
|
121
|
+
tty-prompt (0.21.0)
|
161
122
|
necromancer (~> 0.5.0)
|
162
123
|
pastel (~> 0.7.0)
|
163
124
|
tty-reader (~> 0.7.0)
|
@@ -165,40 +126,30 @@ GEM
|
|
165
126
|
tty-cursor (~> 0.7)
|
166
127
|
tty-screen (~> 0.7)
|
167
128
|
wisper (~> 2.0.0)
|
168
|
-
tty-screen (0.
|
169
|
-
|
170
|
-
tty-cursor (~> 0.7)
|
171
|
-
tty-table (0.11.0)
|
172
|
-
equatable (~> 0.6)
|
173
|
-
necromancer (~> 0.5)
|
174
|
-
pastel (~> 0.7.2)
|
175
|
-
strings (~> 0.1.5)
|
176
|
-
tty-screen (~> 0.7)
|
177
|
-
tty-tree (0.4.0)
|
178
|
-
tty-which (0.4.2)
|
179
|
-
tzinfo (1.2.6)
|
129
|
+
tty-screen (0.8.0)
|
130
|
+
tzinfo (1.2.7)
|
180
131
|
thread_safe (~> 0.1)
|
181
|
-
unicode-display_width (1.
|
132
|
+
unicode-display_width (1.7.0)
|
182
133
|
unicode_utils (1.4.0)
|
183
134
|
wisper (2.0.1)
|
184
135
|
xdg (3.1.1)
|
185
|
-
zeitwerk (2.
|
136
|
+
zeitwerk (2.3.0)
|
186
137
|
|
187
138
|
PLATFORMS
|
188
139
|
ruby
|
189
140
|
|
190
141
|
DEPENDENCIES
|
191
|
-
bundler (~>
|
142
|
+
bundler (~> 2.1)
|
192
143
|
fakefs (~> 0.14)
|
193
144
|
git (~> 1.5)
|
194
145
|
ostruct (~> 0.1)
|
195
146
|
pry (~> 0.11)
|
196
|
-
rake (~>
|
147
|
+
rake (~> 12.3, >= 12.3.3)
|
197
148
|
rspec (~> 3)
|
198
149
|
rspec_junit_formatter (~> 0.4)
|
150
|
+
rubocop (~> 0.86)
|
199
151
|
simplecov (~> 0.16)
|
200
152
|
story_branch!
|
201
|
-
tty (~> 0.10)
|
202
153
|
|
203
154
|
BUNDLED WITH
|
204
|
-
1.
|
155
|
+
2.1.4
|
data/README.md
CHANGED
@@ -4,11 +4,17 @@
|
|
4
4
|
|
5
5
|
# Story Branch
|
6
6
|
|
7
|
-
Story branch is a CLI application that interacts with Pivotal Tracker
|
7
|
+
Story branch is a CLI application that interacts with Pivotal Tracker, Github and Jira
|
8
8
|
at the moment.
|
9
|
-
|
10
|
-
|
11
|
-
the
|
9
|
+
|
10
|
+
For all the trackers it supports creating local branches from the tickets or
|
11
|
+
opening the ticket in your browser from the branch you're working on. In the future
|
12
|
+
I plan to support different workflows in order to integrate your individual
|
13
|
+
process in the tool.
|
14
|
+
|
15
|
+
As for PivotalTracker, since the flow is mostly the same for everyone, it allows
|
16
|
+
you to start and un-start stories as well.
|
17
|
+
|
12
18
|
|
13
19
|
[View Changelog](Changelog.md)
|
14
20
|
|
@@ -45,10 +45,8 @@ module StoryBranch
|
|
45
45
|
|
46
46
|
return unless tracker == 'jira'
|
47
47
|
|
48
|
-
# rubocop:disable Metrics/LineLength
|
49
48
|
username = prompt.ask('Please provide username (email most of the times) for this key:',
|
50
49
|
required: true)
|
51
|
-
# rubocop:enable Metrics/LineLength
|
52
50
|
@new_config.username = username
|
53
51
|
end
|
54
52
|
|
@@ -36,7 +36,7 @@ module StoryBranch
|
|
36
36
|
# remotes/origin/allow.... <- remote branch (remove 'remotes/origin')
|
37
37
|
# * allow.... <- * indicates current branch (remove '* ')
|
38
38
|
# allow <- local branch (do nothing)
|
39
|
-
regex = %r{(^remotes
|
39
|
+
regex = %r{(^remotes/.*/|\s|[*])}
|
40
40
|
all_branches.map do |line|
|
41
41
|
line = line.sub(regex, '')
|
42
42
|
line
|
@@ -15,9 +15,7 @@ module StoryBranch
|
|
15
15
|
@title = blanket_story.title
|
16
16
|
@id = blanket_story.number
|
17
17
|
@labels = blanket_story.labels.map { |label| Label.new(label) }
|
18
|
-
@milestone = if blanket_story.milestone
|
19
|
-
Milestone.new(blanket_story.milestone)
|
20
|
-
end
|
18
|
+
@milestone = Milestone.new(blanket_story.milestone) if blanket_story.milestone
|
21
19
|
@html_url = blanket_story.html_url
|
22
20
|
end
|
23
21
|
|
@@ -12,7 +12,6 @@ module StoryBranch
|
|
12
12
|
module Jira
|
13
13
|
# JIRA API wrapper for story branch tracker
|
14
14
|
class Tracker < StoryBranch::TrackerBase
|
15
|
-
# rubocop:disable Metrics/LineLength
|
16
15
|
def initialize(tracker_domain:, project_id:, api_key:, username:, extra_query:)
|
17
16
|
super
|
18
17
|
|
@@ -23,7 +22,6 @@ module StoryBranch
|
|
23
22
|
@username = username
|
24
23
|
@extra_query = extra_query
|
25
24
|
end
|
26
|
-
# rubocop:enable Metrics/LineLength
|
27
25
|
|
28
26
|
def valid?
|
29
27
|
[@api_key, @project_id, @username, @tracker_url].none?(&:nil?)
|
data/lib/story_branch/main.rb
CHANGED
@@ -93,9 +93,7 @@ module StoryBranch
|
|
93
93
|
end
|
94
94
|
|
95
95
|
def unstaged_changes?
|
96
|
-
unless GitUtils.status?(:untracked) || GitUtils.status?(:modified)
|
97
|
-
return false
|
98
|
-
end
|
96
|
+
return false unless GitUtils.status?(:untracked) || GitUtils.status?(:modified)
|
99
97
|
|
100
98
|
message = <<~MESSAGE
|
101
99
|
There are unstaged changes
|
@@ -166,18 +164,15 @@ module StoryBranch
|
|
166
164
|
branch_name = valid_branch_name(story)
|
167
165
|
return unless branch_name
|
168
166
|
|
169
|
-
# rubocop:disable Metrics/LineLength
|
170
167
|
feature_branch_name_with_story_id = build_branch_name(branch_name, story.id)
|
171
168
|
|
172
169
|
prompt.say("Creating: #{feature_branch_name_with_story_id} with #{current_branch} as parent")
|
173
|
-
# rubocop:enable Metrics/LineLength
|
174
170
|
GitWrapper.create_branch feature_branch_name_with_story_id
|
175
171
|
end
|
176
172
|
|
177
173
|
def valid_branch_name(story)
|
178
174
|
prompt.say "You are checked out at: #{current_branch}"
|
179
|
-
branch_name = prompt.ask('Provide a new branch name',
|
180
|
-
default: story.dashed_title)
|
175
|
+
branch_name = prompt.ask('Provide a new branch name', default: story.dashed_title)
|
181
176
|
feature_branch_name = StringUtils.truncate(branch_name.chomp)
|
182
177
|
|
183
178
|
validate_branch_name(feature_branch_name)
|
@@ -187,8 +182,7 @@ module StoryBranch
|
|
187
182
|
# rubocop:disable Metrics/MethodLength
|
188
183
|
def validate_branch_name(name)
|
189
184
|
if GitUtils.similar_branch? name
|
190
|
-
prompt.warn('This name is very similar to an existing branch.'
|
191
|
-
' It is recommended to use a more unique name.')
|
185
|
+
prompt.warn('This name is very similar to an existing branch. It is recommended to use a more unique name.')
|
192
186
|
decision = prompt.select('What to do?') do |menu|
|
193
187
|
menu.choice 'Rename the branch', 1
|
194
188
|
menu.choice 'Proceed with branch name', 2
|
@@ -221,11 +215,11 @@ module StoryBranch
|
|
221
215
|
tracker_type = @config.tracker_type
|
222
216
|
case tracker_type
|
223
217
|
when 'github'
|
224
|
-
StoryBranch::Github::Tracker.new(
|
218
|
+
StoryBranch::Github::Tracker.new(**@config.tracker_params)
|
225
219
|
when 'pivotal-tracker'
|
226
|
-
StoryBranch::Pivotal::Tracker.new(
|
220
|
+
StoryBranch::Pivotal::Tracker.new(**@config.tracker_params)
|
227
221
|
when 'jira'
|
228
|
-
StoryBranch::Jira::Tracker.new(
|
222
|
+
StoryBranch::Jira::Tracker.new(**@config.tracker_params)
|
229
223
|
end
|
230
224
|
end
|
231
225
|
end
|
data/lib/story_branch/version.rb
CHANGED
data/story_branch.gemspec
CHANGED
@@ -39,7 +39,7 @@ Gem::Specification.new do |spec|
|
|
39
39
|
'documentation_uri' => 'https://github.com/story-branch/story_branch/blob/master/README.md',
|
40
40
|
'source_code_uri' => 'https://github.com/story-branch/story_branch'
|
41
41
|
}
|
42
|
-
spec.required_ruby_version = ['>= 2.4', '<
|
42
|
+
spec.required_ruby_version = ['>= 2.4', '< 3']
|
43
43
|
|
44
44
|
# Specify which files should be added to the gem when it is released.
|
45
45
|
# The `git ls-files -z` loads the files in the RubyGem that have been
|
@@ -63,15 +63,15 @@ Gem::Specification.new do |spec|
|
|
63
63
|
spec.add_runtime_dependency 'tty-prompt', '~> 0.18'
|
64
64
|
spec.add_runtime_dependency 'xdg', '~> 3.0'
|
65
65
|
|
66
|
-
spec.add_development_dependency 'bundler', '~>
|
66
|
+
spec.add_development_dependency 'bundler', '~> 2.1'
|
67
67
|
spec.add_development_dependency 'simplecov', '~> 0.16'
|
68
68
|
spec.add_development_dependency 'fakefs', '~> 0.14'
|
69
69
|
spec.add_development_dependency 'git', '~> 1.5'
|
70
70
|
spec.add_development_dependency 'ostruct', '~> 0.1'
|
71
71
|
spec.add_development_dependency 'pry', '~> 0.11'
|
72
|
-
spec.add_development_dependency 'rake', '~>
|
72
|
+
spec.add_development_dependency 'rake', '~> 12.3', '>= 12.3.3'
|
73
73
|
spec.add_development_dependency 'rspec', '~> 3'
|
74
|
+
spec.add_development_dependency 'rubocop', '~> 0.86'
|
74
75
|
spec.add_development_dependency 'rspec_junit_formatter', '~> 0.4'
|
75
|
-
spec.add_development_dependency 'tty', '~> 0.10'
|
76
76
|
end
|
77
77
|
# rubocop:enable Metrics/BlockLength
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../lib/story_branch/git_wrapper'
|
4
|
+
|
5
|
+
def grab_and_print_log(from, to)
|
6
|
+
all_log = StoryBranch::GitWrapper.command("log #{from}..#{to}")
|
7
|
+
|
8
|
+
matches = all_log.scan(/CHANGELOG\n(.*?)--- 8< ---/m).flatten
|
9
|
+
matches.map!(&:strip)
|
10
|
+
|
11
|
+
File.open("release-#{from}-#{to}.md", 'w') do |output|
|
12
|
+
output << "# RELEASE NOTES\n\n"
|
13
|
+
matches.each do |m|
|
14
|
+
output << "#{m}\n"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
# rubocop:disable Metrics/MethodLength
|
20
|
+
def print_all_logs
|
21
|
+
all_tags = StoryBranch::GitWrapper.command_lines('tag --list')
|
22
|
+
cleanup_tags = all_tags.map do |t|
|
23
|
+
{ cleanup_tag: t.delete('v'), tag: t }
|
24
|
+
end
|
25
|
+
cleanup_tags.sort_by! { |ctags| ctags[:cleanup_tag] }
|
26
|
+
puts cleanup_tags
|
27
|
+
|
28
|
+
cleanup_tags.each_with_index do |tag, idx|
|
29
|
+
next if idx + 1 >= cleanup_tags.length
|
30
|
+
|
31
|
+
from = tag[:tag]
|
32
|
+
to = cleanup_tags[idx + 1][:tag]
|
33
|
+
grab_and_print_log(from, to)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
# rubocop:enable Metrics/MethodLength
|
37
|
+
|
38
|
+
all_logs = ARGV[0] == 'all'
|
39
|
+
if all_logs
|
40
|
+
print_all_logs
|
41
|
+
else
|
42
|
+
from = ARGV[0] || 'v0.7.0'
|
43
|
+
to = ARGV[1] || 'HEAD'
|
44
|
+
grab_and_print_log(from, to)
|
45
|
+
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.7.
|
4
|
+
version: 0.7.2
|
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-06-23 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: blanket_wrapper
|
@@ -146,20 +146,14 @@ dependencies:
|
|
146
146
|
requirements:
|
147
147
|
- - "~>"
|
148
148
|
- !ruby/object:Gem::Version
|
149
|
-
version: '1
|
150
|
-
- - "<"
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '2.0'
|
149
|
+
version: '2.1'
|
153
150
|
type: :development
|
154
151
|
prerelease: false
|
155
152
|
version_requirements: !ruby/object:Gem::Requirement
|
156
153
|
requirements:
|
157
154
|
- - "~>"
|
158
155
|
- !ruby/object:Gem::Version
|
159
|
-
version: '1
|
160
|
-
- - "<"
|
161
|
-
- !ruby/object:Gem::Version
|
162
|
-
version: '2.0'
|
156
|
+
version: '2.1'
|
163
157
|
- !ruby/object:Gem::Dependency
|
164
158
|
name: simplecov
|
165
159
|
requirement: !ruby/object:Gem::Requirement
|
@@ -236,14 +230,20 @@ dependencies:
|
|
236
230
|
requirements:
|
237
231
|
- - "~>"
|
238
232
|
- !ruby/object:Gem::Version
|
239
|
-
version: '
|
233
|
+
version: '12.3'
|
234
|
+
- - ">="
|
235
|
+
- !ruby/object:Gem::Version
|
236
|
+
version: 12.3.3
|
240
237
|
type: :development
|
241
238
|
prerelease: false
|
242
239
|
version_requirements: !ruby/object:Gem::Requirement
|
243
240
|
requirements:
|
244
241
|
- - "~>"
|
245
242
|
- !ruby/object:Gem::Version
|
246
|
-
version: '
|
243
|
+
version: '12.3'
|
244
|
+
- - ">="
|
245
|
+
- !ruby/object:Gem::Version
|
246
|
+
version: 12.3.3
|
247
247
|
- !ruby/object:Gem::Dependency
|
248
248
|
name: rspec
|
249
249
|
requirement: !ruby/object:Gem::Requirement
|
@@ -259,33 +259,33 @@ dependencies:
|
|
259
259
|
- !ruby/object:Gem::Version
|
260
260
|
version: '3'
|
261
261
|
- !ruby/object:Gem::Dependency
|
262
|
-
name:
|
262
|
+
name: rubocop
|
263
263
|
requirement: !ruby/object:Gem::Requirement
|
264
264
|
requirements:
|
265
265
|
- - "~>"
|
266
266
|
- !ruby/object:Gem::Version
|
267
|
-
version: '0.
|
267
|
+
version: '0.86'
|
268
268
|
type: :development
|
269
269
|
prerelease: false
|
270
270
|
version_requirements: !ruby/object:Gem::Requirement
|
271
271
|
requirements:
|
272
272
|
- - "~>"
|
273
273
|
- !ruby/object:Gem::Version
|
274
|
-
version: '0.
|
274
|
+
version: '0.86'
|
275
275
|
- !ruby/object:Gem::Dependency
|
276
|
-
name:
|
276
|
+
name: rspec_junit_formatter
|
277
277
|
requirement: !ruby/object:Gem::Requirement
|
278
278
|
requirements:
|
279
279
|
- - "~>"
|
280
280
|
- !ruby/object:Gem::Version
|
281
|
-
version: '0.
|
281
|
+
version: '0.4'
|
282
282
|
type: :development
|
283
283
|
prerelease: false
|
284
284
|
version_requirements: !ruby/object:Gem::Requirement
|
285
285
|
requirements:
|
286
286
|
- - "~>"
|
287
287
|
- !ruby/object:Gem::Version
|
288
|
-
version: '0.
|
288
|
+
version: '0.4'
|
289
289
|
description: |
|
290
290
|
This simple gem allows you to create a branch based on the existing issues
|
291
291
|
in your preferred tracker. It integrates with PivotalTracker, Github and
|
@@ -309,6 +309,7 @@ files:
|
|
309
309
|
- ".circleci/setup-rubygems.sh"
|
310
310
|
- ".github/ISSUE_TEMPLATE.md"
|
311
311
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
312
|
+
- ".github/weekly-digest.yml"
|
312
313
|
- ".github/workflows/rubocop.yml"
|
313
314
|
- ".gitignore"
|
314
315
|
- ".rspec"
|
@@ -367,6 +368,7 @@ files:
|
|
367
368
|
- lib/story_branch/url_opener.rb
|
368
369
|
- lib/story_branch/version.rb
|
369
370
|
- story_branch.gemspec
|
371
|
+
- tools/prep_changelog.rb
|
370
372
|
homepage: https://github.com/story-branch/story_branch
|
371
373
|
licenses:
|
372
374
|
- MIT
|
@@ -386,7 +388,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
386
388
|
version: '2.4'
|
387
389
|
- - "<"
|
388
390
|
- !ruby/object:Gem::Version
|
389
|
-
version: '
|
391
|
+
version: '3'
|
390
392
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
391
393
|
requirements:
|
392
394
|
- - ">="
|