octopolo 1.11.0 → 1.11.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: adcd66e3b4f8ab94b6ab63e744a751e3495e341988a61b2fc82a1997f0c47a95
4
- data.tar.gz: 5313f58f994c232025fdab08f93d228a6eb897a65b3b5cd83d73f8146382a7a1
3
+ metadata.gz: 9e9dcb3c285dee728e32143793b4f45f362545283e9519f05e0248ac331a39a4
4
+ data.tar.gz: 78c611ed4b2c9a2a9bfe245bb59214eaa1324111db2ba07bb2201e1839030df2
5
5
  SHA512:
6
- metadata.gz: 899a4b240b073b59cc9d48eb49ed7e08f2234cf3c60c8e4e183958c88e307661d5e6faeb79ec23e4535c6af6bf8811c1793993a8e515ec18e8fa31725bbcab9f
7
- data.tar.gz: d2355075f85bc2fa75fe3d361c51abcd3a81b0e271d6cb661948d49a036095dd1699c300fa5bf59bec484f13991d5b5a49d3fef549a422d57f875a152bf34e9e
6
+ metadata.gz: 532b9e43dc89f90caed04adaf89374451607da2cf37f90b2d87128d7dd694e070a9b2023e0c9660da5e0b9839f006c8d336ac5fffccab27763d30099b528b0d5
7
+ data.tar.gz: f6fee048785044cab4089f1a6c4df05c5616d3d98b610c1d1af4b0446ce630e638882a790555a8fe580c187f93e955a19ef001788f887f181a0554fbbe2d4c14
@@ -1,3 +1,8 @@
1
+ #### v1.11.1
2
+ * Make expedite's branch form more flexible
3
+
4
+ > Emma Sax: production-status-check[bot]: https://github.com/sportngin/octopolo/pull/135
5
+
1
6
  #### v1.11.0
2
7
  #### v1.10.0
3
8
  #### v1.9.1
@@ -3,7 +3,7 @@ command 'pull-request' do |c|
3
3
  c.desc "Branch to create the pull request against"
4
4
  c.flag [:d, :dest, :destination], :arg_name => "destination_branch", :default_value => Octopolo.config.deploy_branch
5
5
 
6
- c.desc "Pass -x to skip the prompt and infer from branch. Expects the branch to be in this format: JIRA-123_describe_pr"
6
+ c.desc "Pass -x to skip the prompt and infer from branch. Expects the branch to be in this format: JIRA-123_describe_pr OR JIRA_123_describe_pr"
7
7
  c.switch [:x, :expedite], :arg_name => "expedite"
8
8
 
9
9
  c.desc "Use $EDITOR to update PR description before creating"
@@ -29,9 +29,9 @@ module Octopolo
29
29
  GitHub.connect do
30
30
 
31
31
  if options[:expedite]
32
- infer_questionaire
32
+ infer_questionnaire
33
33
  else
34
- ask_questionaire
34
+ ask_questionnaire
35
35
  end
36
36
 
37
37
  create_pull_request
@@ -43,7 +43,7 @@ module Octopolo
43
43
  end
44
44
 
45
45
  # Private: Ask questions to create a pull request
46
- def ask_questionaire
46
+ def ask_questionnaire
47
47
  alert_reserved_and_exit if git.reserved_branch?
48
48
  announce
49
49
  ask_title
@@ -51,25 +51,30 @@ module Octopolo
51
51
  ask_pivotal_ids if config.use_pivotal_tracker
52
52
  ask_jira_ids if config.use_jira
53
53
  end
54
- private :ask_questionaire
54
+ private :ask_questionnaire
55
55
 
56
- def infer_questionaire
56
+ def infer_questionnaire
57
57
  alert_reserved_and_exit if git.reserved_branch?
58
58
  check_branch_format
59
59
  branch_arr = git.current_branch.split('_')
60
60
  issue = branch_arr[0].upcase
61
- descr = branch_arr[1..-1].join(' ')
61
+ if issue.include?('-')
62
+ descr = branch_arr[1..-1].join(' ')
63
+ else
64
+ issue = "#{issue}-#{branch_arr[1]}"
65
+ descr = branch_arr[2..-1].join(' ')
66
+ end
62
67
 
63
- self.title = "#{issue} #{descr}"
68
+ self.title = "#{issue} #{descr.capitalize}"
64
69
  self.pivotal_ids = [issue] if config.use_pivotal_tracker
65
70
  self.jira_ids = [issue] if config.use_jira
66
71
  end
67
- private :infer_questionaire
72
+ private :infer_questionnaire
68
73
 
69
74
  def check_branch_format
70
- return if /.*-\d+_.*/ =~ git.current_branch
75
+ return if (/[a-zA-Z]+-\d+_.*/ =~ git.current_branch || /[a-zA-Z]+_\d+_.*/ =~ git.current_branch)
71
76
 
72
- cli.say "Branch must match format like 'iss-123_describe_branch' to expedite"
77
+ cli.say "Branch must match format like 'iss-123_describe_branch' or 'iss_123_describe_branch' to expedite"
73
78
  exit 1
74
79
  end
75
80
  private :check_branch_format
@@ -1,3 +1,3 @@
1
1
  module Octopolo
2
- VERSION = "1.11.0"
2
+ VERSION = "1.11.1"
3
3
  end
@@ -45,7 +45,7 @@ module Octopolo
45
45
  context "#execute" do
46
46
  it "if connected to GitHub, asks some questions, creates the pull request, and opens it" do
47
47
  GitHub.should_receive(:connect).and_yield
48
- expect(subject).to receive(:ask_questionaire)
48
+ expect(subject).to receive(:ask_questionnaire)
49
49
  expect(subject).to receive(:create_pull_request)
50
50
  expect(subject).to receive(:update_pivotal)
51
51
  expect(subject).to receive(:update_jira)
@@ -61,7 +61,7 @@ module Octopolo
61
61
  end
62
62
  end
63
63
 
64
- context "#ask_questionaire" do
64
+ context "#ask_questionnaire" do
65
65
  it "asks appropriate questions to create a pull request" do
66
66
  expect(subject).to receive(:announce)
67
67
  expect(subject).to receive(:ask_title)
@@ -69,7 +69,7 @@ module Octopolo
69
69
  expect(subject).to receive(:ask_jira_ids)
70
70
  expect(subject).to receive(:ask_labels)
71
71
 
72
- subject.send(:ask_questionaire)
72
+ subject.send(:ask_questionnaire)
73
73
  end
74
74
 
75
75
  context "when checking for staging branch" do
@@ -85,7 +85,7 @@ module Octopolo
85
85
 
86
86
  subject.should_receive(:alert_reserved_and_exit)
87
87
 
88
- subject.send(:ask_questionaire)
88
+ subject.send(:ask_questionnaire)
89
89
  end
90
90
 
91
91
  it "should not ask if the branch is not staging" do
@@ -93,7 +93,7 @@ module Octopolo
93
93
 
94
94
  subject.should_not_receive(:alert_reserved_and_exit)
95
95
 
96
- subject.send(:ask_questionaire)
96
+ subject.send(:ask_questionnaire)
97
97
  end
98
98
  end
99
99
  end
@@ -101,13 +101,23 @@ module Octopolo
101
101
  context "#expedite" do
102
102
  subject { PullRequest.new(nil, { expedite: true }) }
103
103
 
104
- context 'good format' do
104
+ context 'good format 1' do
105
105
  let(:current_branch) { 'abc-123_so_fast'}
106
106
 
107
107
  it 'likes the issue-123_blah branch format' do
108
- subject.send(:infer_questionaire)
108
+ subject.send(:infer_questionnaire)
109
109
  expect(subject.jira_ids).to eq(['ABC-123'])
110
- expect(subject.title).to eq('ABC-123 so fast')
110
+ expect(subject.title).to eq('ABC-123 So fast')
111
+ end
112
+ end
113
+
114
+ context 'good format 2' do
115
+ let(:current_branch) { 'abc_123_so_fast'}
116
+
117
+ it 'likes the issue-123_blah branch format' do
118
+ subject.send(:infer_questionnaire)
119
+ expect(subject.jira_ids).to eq(['ABC-123'])
120
+ expect(subject.title).to eq('ABC-123 So fast')
111
121
  end
112
122
  end
113
123
 
@@ -117,7 +127,7 @@ module Octopolo
117
127
  it 'does not like other branch format' do
118
128
  subject.git.stub(:reserved_branch?).and_return false
119
129
  cli.should_receive(:say)
120
- expect { subject.send(:infer_questionaire) }.to raise_error(SystemExit)
130
+ expect { subject.send(:infer_questionnaire) }.to raise_error(SystemExit)
121
131
  end
122
132
  end
123
133
 
@@ -125,7 +135,7 @@ module Octopolo
125
135
  subject.git.stub(:reserved_branch?).and_return true
126
136
  subject.should_receive(:alert_reserved_and_exit).and_call_original
127
137
  cli.should_receive(:say)
128
- expect { subject.send(:infer_questionaire) }.to raise_error(SystemExit)
138
+ expect { subject.send(:infer_questionnaire) }.to raise_error(SystemExit)
129
139
  end
130
140
  end
131
141
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopolo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.0
4
+ version: 1.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Byrne
@@ -10,230 +10,230 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-08-06 00:00:00.000000000 Z
13
+ date: 2019-11-04 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: gli
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - "~>"
19
+ - - ~>
20
20
  - !ruby/object:Gem::Version
21
21
  version: '2.13'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
- - - "~>"
26
+ - - ~>
27
27
  - !ruby/object:Gem::Version
28
28
  version: '2.13'
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: hashie
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - "~>"
33
+ - - ~>
34
34
  - !ruby/object:Gem::Version
35
35
  version: '1.2'
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - "~>"
40
+ - - ~>
41
41
  - !ruby/object:Gem::Version
42
42
  version: '1.2'
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: octokit
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - "~>"
47
+ - - ~>
48
48
  - !ruby/object:Gem::Version
49
49
  version: '4.0'
50
50
  type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
- - - "~>"
54
+ - - ~>
55
55
  - !ruby/object:Gem::Version
56
56
  version: '4.0'
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: public_suffix
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
- - - "~>"
61
+ - - ~>
62
62
  - !ruby/object:Gem::Version
63
63
  version: '2.0'
64
64
  type: :runtime
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
- - - "~>"
68
+ - - ~>
69
69
  - !ruby/object:Gem::Version
70
70
  version: '2.0'
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: highline
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
- - - "~>"
75
+ - - ~>
76
76
  - !ruby/object:Gem::Version
77
77
  version: '1.6'
78
78
  type: :runtime
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
- - - "~>"
82
+ - - ~>
83
83
  - !ruby/object:Gem::Version
84
84
  version: '1.6'
85
85
  - !ruby/object:Gem::Dependency
86
86
  name: pivotal-tracker
87
87
  requirement: !ruby/object:Gem::Requirement
88
88
  requirements:
89
- - - "~>"
89
+ - - ~>
90
90
  - !ruby/object:Gem::Version
91
91
  version: '0.5'
92
92
  type: :runtime
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
- - - "~>"
96
+ - - ~>
97
97
  - !ruby/object:Gem::Version
98
98
  version: '0.5'
99
99
  - !ruby/object:Gem::Dependency
100
100
  name: jiralicious
101
101
  requirement: !ruby/object:Gem::Requirement
102
102
  requirements:
103
- - - "~>"
103
+ - - ~>
104
104
  - !ruby/object:Gem::Version
105
105
  version: '0.5'
106
106
  type: :runtime
107
107
  prerelease: false
108
108
  version_requirements: !ruby/object:Gem::Requirement
109
109
  requirements:
110
- - - "~>"
110
+ - - ~>
111
111
  - !ruby/object:Gem::Version
112
112
  version: '0.5'
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: semantic
115
115
  requirement: !ruby/object:Gem::Requirement
116
116
  requirements:
117
- - - "~>"
117
+ - - ~>
118
118
  - !ruby/object:Gem::Version
119
119
  version: '1.3'
120
120
  type: :runtime
121
121
  prerelease: false
122
122
  version_requirements: !ruby/object:Gem::Requirement
123
123
  requirements:
124
- - - "~>"
124
+ - - ~>
125
125
  - !ruby/object:Gem::Version
126
126
  version: '1.3'
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: nokogiri-happymapper
129
129
  requirement: !ruby/object:Gem::Requirement
130
130
  requirements:
131
- - - "~>"
131
+ - - ~>
132
132
  - !ruby/object:Gem::Version
133
133
  version: 0.6.0
134
134
  type: :runtime
135
135
  prerelease: false
136
136
  version_requirements: !ruby/object:Gem::Requirement
137
137
  requirements:
138
- - - "~>"
138
+ - - ~>
139
139
  - !ruby/object:Gem::Version
140
140
  version: 0.6.0
141
141
  - !ruby/object:Gem::Dependency
142
142
  name: rake
143
143
  requirement: !ruby/object:Gem::Requirement
144
144
  requirements:
145
- - - "~>"
145
+ - - ~>
146
146
  - !ruby/object:Gem::Version
147
147
  version: '10.1'
148
148
  type: :development
149
149
  prerelease: false
150
150
  version_requirements: !ruby/object:Gem::Requirement
151
151
  requirements:
152
- - - "~>"
152
+ - - ~>
153
153
  - !ruby/object:Gem::Version
154
154
  version: '10.1'
155
155
  - !ruby/object:Gem::Dependency
156
156
  name: bundler
157
157
  requirement: !ruby/object:Gem::Requirement
158
158
  requirements:
159
- - - "~>"
159
+ - - ~>
160
160
  - !ruby/object:Gem::Version
161
161
  version: '1.16'
162
162
  type: :development
163
163
  prerelease: false
164
164
  version_requirements: !ruby/object:Gem::Requirement
165
165
  requirements:
166
- - - "~>"
166
+ - - ~>
167
167
  - !ruby/object:Gem::Version
168
168
  version: '1.16'
169
169
  - !ruby/object:Gem::Dependency
170
170
  name: rspec
171
171
  requirement: !ruby/object:Gem::Requirement
172
172
  requirements:
173
- - - "~>"
173
+ - - ~>
174
174
  - !ruby/object:Gem::Version
175
175
  version: '2.99'
176
176
  type: :development
177
177
  prerelease: false
178
178
  version_requirements: !ruby/object:Gem::Requirement
179
179
  requirements:
180
- - - "~>"
180
+ - - ~>
181
181
  - !ruby/object:Gem::Version
182
182
  version: '2.99'
183
183
  - !ruby/object:Gem::Dependency
184
184
  name: guard
185
185
  requirement: !ruby/object:Gem::Requirement
186
186
  requirements:
187
- - - "~>"
187
+ - - ~>
188
188
  - !ruby/object:Gem::Version
189
189
  version: '2.6'
190
190
  type: :development
191
191
  prerelease: false
192
192
  version_requirements: !ruby/object:Gem::Requirement
193
193
  requirements:
194
- - - "~>"
194
+ - - ~>
195
195
  - !ruby/object:Gem::Version
196
196
  version: '2.6'
197
197
  - !ruby/object:Gem::Dependency
198
198
  name: guard-rspec
199
199
  requirement: !ruby/object:Gem::Requirement
200
200
  requirements:
201
- - - "~>"
201
+ - - ~>
202
202
  - !ruby/object:Gem::Version
203
203
  version: '4.3'
204
204
  type: :development
205
205
  prerelease: false
206
206
  version_requirements: !ruby/object:Gem::Requirement
207
207
  requirements:
208
- - - "~>"
208
+ - - ~>
209
209
  - !ruby/object:Gem::Version
210
210
  version: '4.3'
211
211
  - !ruby/object:Gem::Dependency
212
212
  name: hitimes
213
213
  requirement: !ruby/object:Gem::Requirement
214
214
  requirements:
215
- - - "~>"
215
+ - - ~>
216
216
  - !ruby/object:Gem::Version
217
217
  version: 1.2.6
218
218
  type: :development
219
219
  prerelease: false
220
220
  version_requirements: !ruby/object:Gem::Requirement
221
221
  requirements:
222
- - - "~>"
222
+ - - ~>
223
223
  - !ruby/object:Gem::Version
224
224
  version: 1.2.6
225
225
  - !ruby/object:Gem::Dependency
226
226
  name: octopolo-plugin-example
227
227
  requirement: !ruby/object:Gem::Requirement
228
228
  requirements:
229
- - - "~>"
229
+ - - ~>
230
230
  - !ruby/object:Gem::Version
231
231
  version: '0'
232
232
  type: :development
233
233
  prerelease: false
234
234
  version_requirements: !ruby/object:Gem::Requirement
235
235
  requirements:
236
- - - "~>"
236
+ - - ~>
237
237
  - !ruby/object:Gem::Version
238
238
  version: '0'
239
239
  description: A set of GitHub workflow scripts.
@@ -247,12 +247,12 @@ executables:
247
247
  extensions: []
248
248
  extra_rdoc_files: []
249
249
  files:
250
- - ".gitignore"
251
- - ".octopolo.yml"
252
- - ".ruby-gemset"
253
- - ".ruby-version"
254
- - ".soyuz.yml"
255
- - ".travis.yml"
250
+ - .gitignore
251
+ - .octopolo.yml
252
+ - .ruby-gemset
253
+ - .ruby-version
254
+ - .soyuz.yml
255
+ - .travis.yml
256
256
  - CHANGELOG.markdown
257
257
  - Gemfile
258
258
  - Guardfile
@@ -379,17 +379,16 @@ require_paths:
379
379
  - lib
380
380
  required_ruby_version: !ruby/object:Gem::Requirement
381
381
  requirements:
382
- - - ">="
382
+ - - '>='
383
383
  - !ruby/object:Gem::Version
384
384
  version: '0'
385
385
  required_rubygems_version: !ruby/object:Gem::Requirement
386
386
  requirements:
387
- - - ">="
387
+ - - '>='
388
388
  - !ruby/object:Gem::Version
389
389
  version: '0'
390
390
  requirements: []
391
- rubyforge_project:
392
- rubygems_version: 2.7.8
391
+ rubygems_version: 3.0.2
393
392
  signing_key:
394
393
  specification_version: 4
395
394
  summary: A set of GitHub workflow scripts to provide a smooth development process