geet 0.10.0 → 0.13.0

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: 7ba90d01dc763b385e656d16240041211d032525e9049f4e3771a4af6c4d4e98
4
- data.tar.gz: cfe4cfe252cdd952b2df78d9e34163623f53eb1a0ca365c7a9fde373d7008535
3
+ metadata.gz: 9e3fb8be731151a44f97d99825b4635046f3a52d444709ade0b538f6df5f9032
4
+ data.tar.gz: a643e30c0e1be8851f051593b29d64296e6c8ec7fdcdfb8548bb98a8412fd20b
5
5
  SHA512:
6
- metadata.gz: beaed59c8488b6034935b03961a89699c2818075fda8a0bf8eccac349bc3b695cf036b0f1c393f8d11c3c13f8d86dd8ffd817fcb101e2cce0ac01d396f7ecfd1
7
- data.tar.gz: f7af3b4e631dfef62b00fe27f9293a5dfdc37c6dd5ae379065a27532325908b83521bf3215f80d43bb773f53fc175ad4798555cb3297c7cbd3a73f414aebb35d
6
+ metadata.gz: 3b26b8dddfe4ce9af0cd97e43a0e3f36165c101fb7b468882397be364880ef110124b1ea2c1364510b78f3f638395a75691b291ad199791da8480c17be715a68
7
+ data.tar.gz: 0ba381a84d8e6ddad6e0cbd8e1ac498c5b51447019ff091e8509f5902785083fa56b461ce0537c75a3ad221571fa4a8ee9b1d5c2d59aedde832767e65b449875
data/.rubocop.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  inherit_from: .rubocop_todo.yml
2
2
  AllCops:
3
- TargetRubyVersion: 2.3
3
+ TargetRubyVersion: 2.6
4
4
 
5
5
  Layout/ExtraSpacing:
6
6
  Enabled: false
@@ -56,10 +56,6 @@ Style/ConditionalAssignment:
56
56
  Style/DoubleNegation:
57
57
  Enabled: false
58
58
 
59
- Style/GuardClause:
60
- Exclude:
61
- - 'lib/geet/git/repository.rb'
62
-
63
59
  Style/IfUnlessModifier:
64
60
  Enabled: false
65
61
 
@@ -72,5 +68,10 @@ Style/Next:
72
68
  Style/TrailingCommaInArguments:
73
69
  Enabled: false
74
70
 
75
- Style/TrailingCommaInLiteral:
76
- Enabled: false
71
+ Style/TrailingCommaInArrayLiteral:
72
+ EnforcedStyleForMultiline: consistent_comma
73
+ Enabled: true
74
+
75
+ Style/TrailingCommaInHashLiteral:
76
+ EnforcedStyleForMultiline: consistent_comma
77
+ Enabled: true
data/.rubocop_todo.yml CHANGED
@@ -1,10 +1,131 @@
1
- # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2017-12-24 11:42:10 +0100 using RuboCop version 0.52.0.
4
- # The point is for the user to remove these configuration records
5
- # one by one as the offenses are removed from the code base.
6
- # Note that changes in the inspected code, or installation of new
7
- # versions of RuboCop, may require this file to be generated again.
1
+ AllCops:
2
+ NewCops: disable
3
+
4
+ Metrics/MethodLength:
5
+ Enabled: false
6
+
7
+ # Offense count: 20
8
+ # This cop supports safe autocorrection (--autocorrect).
9
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, IgnoredPatterns.
10
+ # URISchemes: http, https
11
+ Layout/LineLength:
12
+ Enabled: false
13
+
14
+ # Offense count: 1
15
+ # Configuration parameters: Include.
16
+ # Include: **/*.gemspec
17
+ Gemspec/RequiredRubyVersion:
18
+ Exclude:
19
+ - 'geet.gemspec'
20
+
21
+ # Offense count: 1
22
+ # This cop supports safe autocorrection (--autocorrect).
23
+ Layout/ClosingParenthesisIndentation:
24
+ Exclude:
25
+ - 'lib/geet/services/create_issue.rb'
26
+
27
+ # Offense count: 8
28
+ # This cop supports safe autocorrection (--autocorrect).
29
+ # Configuration parameters: AllowForAlignment.
30
+ Layout/CommentIndentation:
31
+ Exclude:
32
+ - 'spec/integration/create_pr_spec.rb'
33
+ - 'spec/integration/merge_pr_spec.rb'
34
+
35
+ # Offense count: 2
36
+ # This cop supports safe autocorrection (--autocorrect).
37
+ Layout/ElseAlignment:
38
+ Exclude:
39
+ - 'lib/geet/github/pr.rb'
40
+ - 'lib/geet/helpers/services_workflow_helper.rb'
41
+
42
+ # Offense count: 1
43
+ # This cop supports safe autocorrection (--autocorrect).
44
+ Layout/EmptyLineAfterGuardClause:
45
+ Exclude:
46
+ - 'lib/geet/github/api_interface.rb'
47
+
48
+ # Offense count: 2
49
+ # This cop supports safe autocorrection (--autocorrect).
50
+ # Configuration parameters: EnforcedStyle.
51
+ # SupportedStyles: empty_lines, no_empty_lines
52
+ Layout/EmptyLinesAroundBlockBody:
53
+ Exclude:
54
+ - 'spec/integration/list_issues_spec.rb'
55
+ - 'spec/integration/open_pr_spec.rb'
56
+
57
+ # Offense count: 2
58
+ # This cop supports safe autocorrection (--autocorrect).
59
+ # Configuration parameters: EnforcedStyleAlignWith, Severity.
60
+ # SupportedStylesAlignWith: keyword, variable, start_of_line
61
+ Layout/EndAlignment:
62
+ Exclude:
63
+ - 'lib/geet/github/pr.rb'
64
+ - 'lib/geet/helpers/services_workflow_helper.rb'
65
+
66
+ # Offense count: 2
67
+ # This cop supports safe autocorrection (--autocorrect).
68
+ # Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
69
+ Layout/ExtraSpacing:
70
+ Exclude:
71
+ - 'lib/geet/commandline/configuration.rb'
72
+
73
+ # Offense count: 1
74
+ # This cop supports safe autocorrection (--autocorrect).
75
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
76
+ # SupportedStyles: consistent, align_parentheses
77
+ Layout/FirstParameterIndentation:
78
+ Exclude:
79
+ - 'lib/geet/services/create_issue.rb'
80
+
81
+ # Offense count: 2
82
+ # This cop supports safe autocorrection (--autocorrect).
83
+ # Configuration parameters: Width, AllowedPatterns, IgnoredPatterns.
84
+ Layout/IndentationWidth:
85
+ Exclude:
86
+ - 'lib/geet/github/pr.rb'
87
+ - 'lib/geet/helpers/services_workflow_helper.rb'
88
+
89
+ # Offense count: 3
90
+ # This cop supports safe autocorrection (--autocorrect).
91
+ # Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator.
92
+ # SupportedStylesForExponentOperator: space, no_space
93
+ Layout/SpaceAroundOperators:
94
+ Exclude:
95
+ - 'geet.gemspec'
96
+ - 'lib/geet/helpers/os_helper.rb'
97
+
98
+ # Offense count: 10
99
+ # This cop supports safe autocorrection (--autocorrect).
100
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
101
+ # SupportedStyles: space, no_space, compact
102
+ # SupportedStylesForEmptyBraces: space, no_space
103
+ Layout/SpaceInsideHashLiteralBraces:
104
+ Exclude:
105
+ - 'bin/geet'
106
+ - 'lib/geet/services/open_repo.rb'
107
+ - 'lib/geet/utils/git_client.rb'
108
+ - 'lib/geet/utils/manual_list_selection.rb'
109
+ - 'spec/spec_helper.rb'
110
+
111
+ # Offense count: 3
112
+ # Configuration parameters: AllowedMethods.
113
+ # AllowedMethods: enums
114
+ Lint/ConstantDefinitionInBlock:
115
+ Exclude:
116
+ - 'spec/integration/open_repo_spec.rb'
117
+
118
+ # Offense count: 1
119
+ # This cop supports safe autocorrection (--autocorrect).
120
+ Lint/DeprecatedClassMethods:
121
+ Exclude:
122
+ - 'bin/geet'
123
+
124
+ # Offense count: 1
125
+ # Configuration parameters: AllowComments.
126
+ Lint/EmptyWhen:
127
+ Exclude:
128
+ - 'lib/geet/services/open_repo.rb'
8
129
 
9
130
  # Offense count: 1
10
131
  # Configuration parameters: MaximumRangeSize.
@@ -12,19 +133,334 @@ Lint/MissingCopEnableDirective:
12
133
  Exclude:
13
134
  - 'lib/geet/commandline/configuration.rb'
14
135
 
15
- # Offense count: 4
16
- Metrics/AbcSize:
17
- Max: 26
136
+ # Offense count: 2
137
+ # This cop supports unsafe autocorrection (--autocorrect-all).
138
+ Lint/NonDeterministicRequireOrder:
139
+ Exclude:
140
+ - 'bin/geet'
141
+ - 'lib/geet/git/repository.rb'
142
+
143
+ # Offense count: 1
144
+ # This cop supports safe autocorrection (--autocorrect).
145
+ Lint/RedundantCopDisableDirective:
146
+ Exclude:
147
+ - 'lib/geet/commandline/configuration.rb'
18
148
 
19
149
  # Offense count: 2
150
+ # This cop supports safe autocorrection (--autocorrect).
151
+ # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
152
+ Lint/UnusedBlockArgument:
153
+ Exclude:
154
+ - 'lib/geet/gitlab/issue.rb'
155
+ - 'lib/geet/gitlab/pr.rb'
156
+
157
+ # Offense count: 2
158
+ # This cop supports safe autocorrection (--autocorrect).
159
+ # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods.
160
+ Lint/UnusedMethodArgument:
161
+ Exclude:
162
+ - 'lib/geet/services/open_pr.rb'
163
+ - 'lib/geet/utils/git_client.rb'
164
+
165
+ # Offense count: 1
166
+ # This cop supports safe autocorrection (--autocorrect).
167
+ # Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
168
+ Lint/UselessAccessModifier:
169
+ Exclude:
170
+ - 'lib/geet/github/milestone.rb'
171
+
172
+ # Offense count: 1
173
+ Lint/UselessAssignment:
174
+ Exclude:
175
+ - 'lib/geet/services/create_issue.rb'
176
+
177
+ # Offense count: 10
178
+ # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods, CountRepeatedAttributes.
179
+ Metrics/AbcSize:
180
+ Max: 65
181
+
182
+ # Offense count: 18
183
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods.
184
+ # AllowedMethods: refine
185
+ Metrics/BlockLength:
186
+ Max: 88
187
+
188
+ # Offense count: 1
189
+ # Configuration parameters: CountBlocks.
190
+ Metrics/BlockNesting:
191
+ Max: 4
192
+
193
+ # Offense count: 4
194
+ # Configuration parameters: CountComments, CountAsOne.
195
+ Metrics/ClassLength:
196
+ Max: 126
197
+
198
+ # Offense count: 6
199
+ # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
20
200
  Metrics/CyclomaticComplexity:
21
- Max: 8
201
+ Max: 20
202
+
203
+ # Offense count: 4
204
+ # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
205
+ Metrics/ParameterLists:
206
+ Max: 9
207
+
208
+ # Offense count: 4
209
+ # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
210
+ Metrics/PerceivedComplexity:
211
+ Max: 12
212
+
213
+ # Offense count: 5
214
+ # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
215
+ # AllowedNames: at, by, db, id, in, io, ip, of, on, os, pp, to
216
+ Naming/MethodParameterName:
217
+ Exclude:
218
+ - 'lib/geet/services/create_pr.rb'
219
+ - 'lib/geet/services/merge_pr.rb'
22
220
 
23
221
  # Offense count: 2
24
- # Configuration parameters: CountComments.
25
- Metrics/MethodLength:
26
- Max: 24
222
+ # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
223
+ # NamePrefix: is_, has_, have_
224
+ # ForbiddenPrefixes: is_, has_, have_
225
+ # AllowedMethods: is_a?
226
+ # MethodDefinitionMacros: define_method, define_singleton_method
227
+ Naming/PredicateName:
228
+ Exclude:
229
+ - 'spec/**/*'
230
+ - 'lib/geet/github/user.rb'
231
+
232
+ # Offense count: 1
233
+ # This cop supports safe autocorrection (--autocorrect).
234
+ # Configuration parameters: PreferredName.
235
+ Naming/RescuedExceptionsVariableName:
236
+ Exclude:
237
+ - 'lib/geet/github/user.rb'
238
+
239
+ # Offense count: 1
240
+ # This cop supports safe autocorrection (--autocorrect).
241
+ Style/BlockComments:
242
+ Exclude:
243
+ - 'spec/spec_helper.rb'
244
+
245
+ # Offense count: 34
246
+ # This cop supports unsafe autocorrection (--autocorrect-all).
247
+ Style/CommentedKeyword:
248
+ Enabled: false
27
249
 
28
- # Offense count: 27
250
+ # Offense count: 38
251
+ # Configuration parameters: AllowedConstants.
29
252
  Style/Documentation:
30
253
  Enabled: false
254
+
255
+ # Offense count: 1
256
+ # This cop supports unsafe autocorrection (--autocorrect-all).
257
+ # Configuration parameters: EnforcedStyle.
258
+ # SupportedStyles: allowed_in_returns, forbidden
259
+ Style/DoubleNegation:
260
+ Exclude:
261
+ - 'bin/geet'
262
+
263
+ # Offense count: 1
264
+ # This cop supports safe autocorrection (--autocorrect).
265
+ # Configuration parameters: EnforcedStyle, AllowComments.
266
+ # SupportedStyles: empty, nil, both
267
+ Style/EmptyElse:
268
+ Exclude:
269
+ - 'lib/geet/utils/git_client.rb'
270
+
271
+ # Offense count: 2
272
+ # This cop supports unsafe autocorrection (--autocorrect-all).
273
+ # Configuration parameters: EnforcedStyle.
274
+ # SupportedStyles: always, always_true, never
275
+ Style/FrozenStringLiteralComment:
276
+ Exclude:
277
+ - 'Rakefile'
278
+ - 'lib/geet/shared/http_error.rb'
279
+
280
+ # Offense count: 6
281
+ # Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
282
+ Style/GuardClause:
283
+ Exclude:
284
+ - 'lib/geet/git/repository.rb'
285
+ - 'lib/geet/github/pr.rb'
286
+ - 'lib/geet/gitlab/pr.rb'
287
+ - 'lib/geet/utils/git_client.rb'
288
+
289
+ # Offense count: 7
290
+ # This cop supports safe autocorrection (--autocorrect).
291
+ # Configuration parameters: EnforcedStyle.
292
+ # SupportedStyles: braces, no_braces
293
+ Style/HashAsLastArrayItem:
294
+ Exclude:
295
+ - 'lib/geet/commandline/configuration.rb'
296
+
297
+ # Offense count: 8
298
+ # This cop supports safe autocorrection (--autocorrect).
299
+ Style/IfUnlessModifier:
300
+ Exclude:
301
+ - 'lib/geet/git/repository.rb'
302
+ - 'lib/geet/github/pr.rb'
303
+ - 'lib/geet/gitlab/pr.rb'
304
+ - 'lib/geet/helpers/os_helper.rb'
305
+ - 'lib/geet/services/create_issue.rb'
306
+ - 'lib/geet/services/create_pr.rb'
307
+
308
+ # Offense count: 1
309
+ # This cop supports unsafe autocorrection (--autocorrect-all).
310
+ Style/InfiniteLoop:
311
+ Exclude:
312
+ - 'lib/geet/services/create_pr.rb'
313
+
314
+ # Offense count: 1
315
+ # This cop supports safe autocorrection (--autocorrect).
316
+ # Configuration parameters: EnforcedStyle.
317
+ # SupportedStyles: line_count_dependent, lambda, literal
318
+ Style/Lambda:
319
+ Exclude:
320
+ - 'spec/integration/create_pr_spec.rb'
321
+
322
+ # Offense count: 1
323
+ # This cop supports safe autocorrection (--autocorrect).
324
+ # Configuration parameters: EnforcedStyle.
325
+ # SupportedStyles: call, braces
326
+ Style/LambdaCall:
327
+ Exclude:
328
+ - 'lib/geet/utils/attributes_selection_manager.rb'
329
+
330
+ # Offense count: 1
331
+ # This cop supports safe autocorrection (--autocorrect).
332
+ # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
333
+ Style/MethodCallWithoutArgsParentheses:
334
+ Exclude:
335
+ - 'lib/geet/utils/git_client.rb'
336
+
337
+ # Offense count: 5
338
+ # This cop supports unsafe autocorrection (--autocorrect-all).
339
+ # Configuration parameters: EnforcedStyle.
340
+ # SupportedStyles: literals, strict
341
+ Style/MutableConstant:
342
+ Exclude:
343
+ - 'lib/geet/shared/repo_permissions.rb'
344
+ - 'lib/geet/utils/git_client.rb'
345
+ - 'spec/integration/open_repo_spec.rb'
346
+
347
+ # Offense count: 10
348
+ # This cop supports safe autocorrection (--autocorrect).
349
+ # Configuration parameters: EnforcedStyle.
350
+ # SupportedStyles: both, prefix, postfix
351
+ Style/NegatedIf:
352
+ Exclude:
353
+ - 'lib/geet/git/repository.rb'
354
+ - 'lib/geet/github/api_interface.rb'
355
+ - 'lib/geet/github/user.rb'
356
+ - 'lib/geet/gitlab/api_interface.rb'
357
+ - 'lib/geet/gitlab/pr.rb'
358
+ - 'lib/geet/services/create_issue.rb'
359
+ - 'lib/geet/services/create_pr.rb'
360
+ - 'lib/geet/utils/attributes_selection_manager.rb'
361
+
362
+ # Offense count: 1
363
+ # This cop supports safe autocorrection (--autocorrect).
364
+ # Configuration parameters: Strict, AllowedNumbers, AllowedPatterns.
365
+ Style/NumericLiterals:
366
+ MinDigits: 6
367
+
368
+ # Offense count: 1
369
+ # This cop supports safe autocorrection (--autocorrect).
370
+ # Configuration parameters: PreferredDelimiters.
371
+ Style/PercentLiteralDelimiters:
372
+ Exclude:
373
+ - 'lib/geet/utils/git_client.rb'
374
+
375
+ # Offense count: 2
376
+ # This cop supports safe autocorrection (--autocorrect).
377
+ Style/RedundantFreeze:
378
+ Exclude:
379
+ - 'lib/geet/shared/selection.rb'
380
+
381
+ # Offense count: 1
382
+ # This cop supports safe autocorrection (--autocorrect).
383
+ Style/RedundantSelf:
384
+ Exclude:
385
+ - 'lib/geet/github/remote_repository.rb'
386
+
387
+ # Offense count: 1
388
+ # This cop supports safe autocorrection (--autocorrect).
389
+ # Configuration parameters: EnforcedStyle, AllowInnerSlashes.
390
+ # SupportedStyles: slashes, percent_r, mixed
391
+ Style/RegexpLiteral:
392
+ Exclude:
393
+ - 'lib/geet/utils/git_client.rb'
394
+
395
+ # Offense count: 1
396
+ # This cop supports unsafe autocorrection (--autocorrect-all).
397
+ Style/SlicingWithRange:
398
+ Exclude:
399
+ - 'lib/geet/utils/git_client.rb'
400
+
401
+ # Offense count: 3
402
+ # This cop supports unsafe autocorrection (--autocorrect-all).
403
+ # Configuration parameters: Mode.
404
+ Style/StringConcatenation:
405
+ Exclude:
406
+ - 'lib/geet/commandline/editor.rb'
407
+ - 'lib/geet/github/api_interface.rb'
408
+ - 'lib/geet/gitlab/api_interface.rb'
409
+
410
+ # Offense count: 22
411
+ # This cop supports safe autocorrection (--autocorrect).
412
+ # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
413
+ # SupportedStyles: single_quotes, double_quotes
414
+ Style/StringLiterals:
415
+ Exclude:
416
+ - 'lib/geet/commandline/configuration.rb'
417
+ - 'lib/geet/git/repository.rb'
418
+ - 'lib/geet/github/remote_repository.rb'
419
+ - 'lib/geet/helpers/os_helper.rb'
420
+ - 'lib/geet/helpers/summary_helper.rb'
421
+ - 'lib/geet/services/add_upstream_repo.rb'
422
+ - 'lib/geet/services/create_pr.rb'
423
+ - 'lib/geet/services/merge_pr.rb'
424
+ - 'lib/geet/utils/git_client.rb'
425
+ - 'spec/integration/open_repo_spec.rb'
426
+
427
+ # Offense count: 1
428
+ # This cop supports safe autocorrection (--autocorrect).
429
+ # Configuration parameters: EnforcedStyle.
430
+ # SupportedStyles: single_quotes, double_quotes
431
+ Style/StringLiteralsInInterpolation:
432
+ Exclude:
433
+ - 'lib/geet/utils/git_client.rb'
434
+
435
+ # Offense count: 1
436
+ # This cop supports safe autocorrection (--autocorrect).
437
+ # Configuration parameters: MinSize.
438
+ # SupportedStyles: percent, brackets
439
+ Style/SymbolArray:
440
+ EnforcedStyle: brackets
441
+
442
+ # Offense count: 1
443
+ # This cop supports safe autocorrection (--autocorrect).
444
+ # Configuration parameters: EnforcedStyle, AllowSafeAssignment.
445
+ # SupportedStyles: require_parentheses, require_no_parentheses, require_parentheses_when_complex
446
+ Style/TernaryParentheses:
447
+ Exclude:
448
+ - 'lib/geet/github/user.rb'
449
+
450
+ # Offense count: 6
451
+ # This cop supports safe autocorrection (--autocorrect).
452
+ # Configuration parameters: EnforcedStyleForMultiline.
453
+ # SupportedStylesForMultiline: comma, consistent_comma, no_comma
454
+ Style/TrailingCommaInArrayLiteral:
455
+ Exclude:
456
+ - 'lib/geet/commandline/configuration.rb'
457
+ - 'lib/geet/shared/repo_permissions.rb'
458
+
459
+ # Offense count: 8
460
+ # This cop supports safe autocorrection (--autocorrect).
461
+ # Configuration parameters: EnforcedStyleForMultiline.
462
+ # SupportedStylesForMultiline: comma, consistent_comma, no_comma
463
+ Style/TrailingCommaInHashLiteral:
464
+ Exclude:
465
+ - 'lib/geet/commandline/configuration.rb'
466
+ - 'spec/integration/open_repo_spec.rb'
data/Gemfile CHANGED
@@ -12,5 +12,5 @@ end
12
12
 
13
13
  group :tools do
14
14
  gem 'byebug', '~> 9.1.0'
15
- gem 'rubocop', '~> 0.52.0'
15
+ gem 'rubocop', '~> 1.35.0'
16
16
  end
data/geet.gemspec CHANGED
@@ -8,9 +8,9 @@ Gem::Specification.new do |s|
8
8
  s.name = 'geet'
9
9
  s.version = Geet::VERSION
10
10
  s.platform = Gem::Platform::RUBY
11
- s.required_ruby_version = '>= 2.3.0'
11
+ s.required_ruby_version = '>= 2.6.0'
12
12
  s.authors = ['Saverio Miroddi']
13
- s.date = '2022-07-03'
13
+ s.date = '2022-08-18'
14
14
  s.email = ['saverio.pub2@gmail.com']
15
15
  s.homepage = 'https://github.com/saveriomiroddi/geet'
16
16
  s.summary = 'Commandline interface for performing SCM host operations, eg. create a PR on GitHub'
@@ -60,6 +60,7 @@ module Geet
60
60
 
61
61
  PR_COMMENT_OPTIONS = [
62
62
  ['-n', '--no-open-pr', "Don't open the PR link in the browser after creation"],
63
+ ['-u', '--upstream', 'Comment on the upstream repository'],
63
64
  'comment',
64
65
  long_help: 'Add a comment to the PR for the current branch.'
65
66
  ]
@@ -34,9 +34,9 @@ module Geet
34
34
  'public' => publik,
35
35
  'files' => {
36
36
  filename => {
37
- 'content' => content
38
- }
39
- }
37
+ 'content' => content,
38
+ },
39
+ },
40
40
  }
41
41
 
42
42
  request_data['description'] = description if description
@@ -19,7 +19,7 @@ module Geet
19
19
  @git_client = git_client
20
20
  end
21
21
 
22
- def execute(comment, no_open_pr: nil)
22
+ def execute(comment, no_open_pr: nil, **)
23
23
  pr = checked_find_branch_pr
24
24
  pr.comment(comment)
25
25
  open_file_with_default_application(pr.link) unless no_open_pr
@@ -136,28 +136,17 @@ module Geet
136
136
  end
137
137
 
138
138
  def edit_pr(pr, labels, milestone, reviewers)
139
- assign_user_thread = assign_authenticated_user(pr)
140
-
141
139
  # labels/reviewers can be nil (parameter not passed) or empty array (parameter passed, but
142
140
  # nothing selected)
143
141
  add_labels_thread = add_labels(pr, labels) if labels && !labels.empty?
144
142
  set_milestone_thread = set_milestone(pr, milestone) if milestone
145
143
  request_review_thread = request_review(pr, reviewers) if reviewers && !reviewers.empty?
146
144
 
147
- assign_user_thread.join
148
145
  add_labels_thread&.join
149
146
  set_milestone_thread&.join
150
147
  request_review_thread&.join
151
148
  end
152
149
 
153
- def assign_authenticated_user(pr)
154
- @out.puts 'Assigning authenticated user...'
155
-
156
- Thread.new do
157
- pr.assign_users(@repository.authenticated_user.username)
158
- end
159
- end
160
-
161
150
  def add_labels(pr, selected_labels)
162
151
  labels_list = selected_labels.map(&:name).join(', ')
163
152
 
data/lib/geet/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Geet
4
- VERSION = '0.10.0'
4
+ VERSION = '0.13.0'
5
5
  end
@@ -158,31 +158,32 @@ describe Geet::Services::CreatePr do
158
158
  # expect(actual_output.string).to eql(expected_output)
159
159
  # end
160
160
 
161
- it "should create a remote branch, when there isn't one (is not tracked)" do
162
- allow(git_client).to receive(:working_tree_clean?).and_return(true)
163
- allow(git_client).to receive(:current_branch).and_return('mybranch')
164
- allow(git_client).to receive(:main_branch).and_return('master')
165
- expect(git_client).to receive(:remote_branch).and_return(nil)
166
- expect(git_client).to receive(:push).with(remote_branch: 'mybranch')
167
-
168
- allow(git_client).to receive(:remote).with(no_args).and_return('git@github.com:donaldduck/testrepo_f')
169
-
170
- expected_output = <<~STR
171
- Creating remote branch "mybranch"...
172
- Creating PR...
173
- Assigning authenticated user...
174
- PR address: https://github.com/donaldduck/testrepo_f/pull/4
175
- STR
176
-
177
- actual_output = StringIO.new
178
-
179
- actual_created_pr = VCR.use_cassette('github_com/create_pr_in_auto_mode_create_upstream') do
180
- service_instance = described_class.new(repository, out: actual_output, git_client: git_client)
181
- service_instance.execute('Title', 'Description', output: actual_output, automated_mode: true, no_open_pr: true)
182
- end
183
-
184
- expect(actual_output.string).to eql(expected_output)
185
- end
161
+ it "should create a remote branch, when there isn't one (is not tracked)"
162
+ # do
163
+ # allow(git_client).to receive(:working_tree_clean?).and_return(true)
164
+ # allow(git_client).to receive(:current_branch).and_return('mybranch')
165
+ # allow(git_client).to receive(:main_branch).and_return('master')
166
+ # expect(git_client).to receive(:remote_branch).and_return(nil)
167
+ # expect(git_client).to receive(:push).with(remote_branch: 'mybranch')
168
+ #
169
+ # allow(git_client).to receive(:remote).with(no_args).and_return('git@github.com:donaldduck/testrepo_f')
170
+ #
171
+ # expected_output = <<~STR
172
+ # Creating remote branch "mybranch"...
173
+ # Creating PR...
174
+ # Assigning authenticated user...
175
+ # PR address: https://github.com/donaldduck/testrepo_f/pull/4
176
+ # STR
177
+ #
178
+ # actual_output = StringIO.new
179
+ #
180
+ # actual_created_pr = VCR.use_cassette('github_com/create_pr_in_auto_mode_create_upstream') do
181
+ # service_instance = described_class.new(repository, out: actual_output, git_client: git_client)
182
+ # service_instance.execute('Title', 'Description', output: actual_output, automated_mode: true, no_open_pr: true)
183
+ # end
184
+ #
185
+ # expect(actual_output.string).to eql(expected_output)
186
+ # end
186
187
  end
187
188
  end # context 'with github.com'
188
189
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Saverio Miroddi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-03 00:00:00.000000000 Z
11
+ date: 2022-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simple_scripting
@@ -66,7 +66,6 @@ files:
66
66
  - ".rspec"
67
67
  - ".rubocop.yml"
68
68
  - ".rubocop_todo.yml"
69
- - ".travis.yml"
70
69
  - Gemfile
71
70
  - LICENSE
72
71
  - README.md
@@ -183,7 +182,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
183
182
  requirements:
184
183
  - - ">="
185
184
  - !ruby/object:Gem::Version
186
- version: 2.3.0
185
+ version: 2.6.0
187
186
  required_rubygems_version: !ruby/object:Gem::Requirement
188
187
  requirements:
189
188
  - - ">="
data/.travis.yml DELETED
@@ -1,17 +0,0 @@
1
- dist: bionic
2
- language: ruby
3
- rvm:
4
- - 2.3
5
- - 2.4
6
- - 2.5
7
- - 2.6
8
- - 2.7
9
- - 3.0
10
- - ruby-head
11
- matrix:
12
- fast_finish: true
13
- allow_failures:
14
- - rvm: ruby-head
15
- # API tokens are always required, but not used in testing, since no requests are actually made.
16
- env:
17
- - GITHUB_API_TOKEN=phony GITLAB_API_TOKEN=phony