groundskeeper-bitcore 0.18.0 → 0.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/groundskeeper.gemspec +1 -0
- data/lib/groundskeeper/commands.rb +15 -6
- data/lib/groundskeeper/jira.rb +16 -1
- data/lib/groundskeeper/version.rb +1 -1
- 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: e7dcfaed6f571874111c1ad58ae2bbbd584ae2d55f65310ac6440b77488f066b
|
4
|
+
data.tar.gz: 48117df263a168b70c69923bed84fd3253528c799c3115f4ef951c5822ded61a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aca1a48ad5c22b23d123d39a4d24c840100d9e31ea16c0694cae3cf983261526fae1157e9bcb198cd52c092466f8360e6d12337f2201d08356366a0055bbcf21
|
7
|
+
data.tar.gz: b2cd407005039a60bf1b034c94f85f3b53dcd624d44a47ad5682634339a2b6dace1432091bdae3a6fd9c94586bb9af624a0628f904c90d66f54974fb97616c04
|
data/groundskeeper.gemspec
CHANGED
@@ -31,6 +31,7 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.executables = "ground"
|
32
32
|
spec.require_paths = %w[lib config]
|
33
33
|
|
34
|
+
spec.required_ruby_version = ">= 2.4"
|
34
35
|
spec.add_dependency "jira-ruby", "~> 2.0"
|
35
36
|
spec.add_dependency "mina", "~> 1.2"
|
36
37
|
spec.add_dependency "mina-whenever", "~> 1.0.1"
|
@@ -114,7 +114,6 @@ module Groundskeeper
|
|
114
114
|
# rubocop:enable Metrics/AbcSize
|
115
115
|
|
116
116
|
# rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity,
|
117
|
-
# rubocop:disable Metrics/PerceivedComplexity
|
118
117
|
def release(options = {})
|
119
118
|
is_initial_release = !version_file.exists?
|
120
119
|
|
@@ -139,7 +138,7 @@ module Groundskeeper
|
|
139
138
|
create_pr
|
140
139
|
end
|
141
140
|
# rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity
|
142
|
-
# rubocop:enable Metrics/MethodLength
|
141
|
+
# rubocop:enable Metrics/MethodLength
|
143
142
|
|
144
143
|
# :nocov:
|
145
144
|
def predeploy(options = {})
|
@@ -285,8 +284,14 @@ module Groundskeeper
|
|
285
284
|
|
286
285
|
def add_version_to_jira_issues
|
287
286
|
issue_ids = jira.included_issues(recent_commits)
|
288
|
-
jira.add_version_to_remote_issues(
|
289
|
-
|
287
|
+
message = jira.add_version_to_remote_issues(
|
288
|
+
next_jira_version_name, issue_ids
|
289
|
+
)
|
290
|
+
if message.blank?
|
291
|
+
console.say("# added version to Jira issues #{issue_ids}", :green)
|
292
|
+
else
|
293
|
+
announce_error(message)
|
294
|
+
end
|
290
295
|
end
|
291
296
|
|
292
297
|
def create_pr
|
@@ -311,6 +316,10 @@ module Groundskeeper
|
|
311
316
|
tag.nil? ? false : git.list_tags.include?(tag)
|
312
317
|
end
|
313
318
|
|
319
|
+
def announce_error(message)
|
320
|
+
console.say("# #{message}", :red)
|
321
|
+
end
|
322
|
+
|
314
323
|
def unrecognized_tag
|
315
324
|
console.say(
|
316
325
|
"Tag not found, try again with an existing tag.",
|
@@ -377,7 +386,7 @@ module Groundskeeper
|
|
377
386
|
end
|
378
387
|
end
|
379
388
|
|
380
|
-
# rubocop:disable Metrics/MethodLength
|
389
|
+
# rubocop:disable Metrics/MethodLength
|
381
390
|
def update_deployed_issues
|
382
391
|
tries = 0
|
383
392
|
|
@@ -406,7 +415,7 @@ module Groundskeeper
|
|
406
415
|
# :nocov:
|
407
416
|
end
|
408
417
|
end
|
409
|
-
# rubocop:enable Metrics/MethodLength
|
418
|
+
# rubocop:enable Metrics/MethodLength
|
410
419
|
|
411
420
|
# :nocov:
|
412
421
|
def release_version
|
data/lib/groundskeeper/jira.rb
CHANGED
@@ -4,6 +4,8 @@ require "cgi"
|
|
4
4
|
require "date"
|
5
5
|
require "jira-ruby"
|
6
6
|
|
7
|
+
class IssueNotFoundError < StandardError; end
|
8
|
+
|
7
9
|
module Groundskeeper
|
8
10
|
# Wraps an interface to Jira.
|
9
11
|
class Jira
|
@@ -46,6 +48,8 @@ module Groundskeeper
|
|
46
48
|
|
47
49
|
# :nocov:
|
48
50
|
def add_version_to_issue(issue_id:, version_name:)
|
51
|
+
raise IssueNotFoundError if client.Issue.find(issue_id).nil?
|
52
|
+
|
49
53
|
client.Issue
|
50
54
|
.find(issue_id)
|
51
55
|
.save(update: { fixVersions: [{ add: { name: version_name } }] })
|
@@ -120,11 +124,22 @@ module Groundskeeper
|
|
120
124
|
client.create_version(name: name, prefix: prefix)
|
121
125
|
end
|
122
126
|
|
127
|
+
# rubocop:disable Metrics/MethodLength
|
123
128
|
def add_version_to_remote_issues(name, issue_ids)
|
129
|
+
failed_issues = []
|
124
130
|
issue_ids.each do |issue_id|
|
125
|
-
|
131
|
+
begin
|
132
|
+
client.add_version_to_issue(issue_id: issue_id, version_name: name)
|
133
|
+
rescue IssueNotFoundError
|
134
|
+
failed_issues << issue_id
|
135
|
+
next
|
136
|
+
end
|
126
137
|
end
|
138
|
+
return "" unless failed_issues.count.positive?
|
139
|
+
|
140
|
+
"Jira issue(s) not found, is #{failed_issues.join(', ')} correct?"
|
127
141
|
end
|
142
|
+
# rubocop:enable Metrics/MethodLength
|
128
143
|
|
129
144
|
def transition_remote_issues(transition_type, issue_ids)
|
130
145
|
issue_ids.each do |issue_id|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: groundskeeper-bitcore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.19.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BIT Core
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain:
|
11
11
|
- certs/ericcf.pem
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-10-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jira-ruby
|
@@ -217,7 +217,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
217
217
|
requirements:
|
218
218
|
- - ">="
|
219
219
|
- !ruby/object:Gem::Version
|
220
|
-
version: '
|
220
|
+
version: '2.4'
|
221
221
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
222
222
|
requirements:
|
223
223
|
- - ">="
|