gitlab_support_readiness 1.0.129 → 1.0.131
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 735921b71920c43c43ac6c5d8d4bf1b4969b0cc42b9f127f0ed679ca94f7ac83
|
4
|
+
data.tar.gz: faabddbb97e01e10ababbb5cbbbc2188857af4d899bbaa22a29d939465345efd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94e652623f6b39d4da4b1ceccf6279d8ddeb480609251cf99369f34798b49d85f068a59ad57aeae71b9903718c4b5eb7b49b04aed761c83bcddcde6eedf3f988
|
7
|
+
data.tar.gz: 436b8d4cec96ccb6b7d7589c36793302f56842ee3d84904ee3f0831d8e87d3c993833e501adf45472516beecb800f5fa54f61be7fb46ed4faa7166db9d0336a6
|
@@ -90,7 +90,7 @@ module Readiness
|
|
90
90
|
def self.global_accounts(client)
|
91
91
|
query = Queries.new(global_sync_query_string)
|
92
92
|
results = Queries.run!(client, query)
|
93
|
-
results.map { |r| global_sync_object(r) }
|
93
|
+
results.map { |r| global_sync_object(r) }.compact
|
94
94
|
end
|
95
95
|
|
96
96
|
##
|
@@ -125,6 +125,8 @@ module Readiness
|
|
125
125
|
# @since 1.0.26
|
126
126
|
def self.global_sync_object(account)
|
127
127
|
subscriptions = account_subscriptions(account)
|
128
|
+
return nil if us_gov_only?(account, subscriptions)
|
129
|
+
|
128
130
|
expiration = account_expiration(account)
|
129
131
|
type = account_type(account, expiration)
|
130
132
|
partner = %w[alliance_partner open_partner select_partner].include?(type)
|
@@ -442,6 +444,38 @@ module Readiness
|
|
442
444
|
}
|
443
445
|
end
|
444
446
|
|
447
|
+
##
|
448
|
+
# Determines if a given account with its subscriptions is US Government only
|
449
|
+
#
|
450
|
+
# @author Jason Colyer
|
451
|
+
# @since 1.0.130
|
452
|
+
def self.us_gov_only?(account, subs)
|
453
|
+
return false if subs.count.zero?
|
454
|
+
return false if subs.include? 'sub_consumption_cicd_minutes'
|
455
|
+
return false if subs.include? 'sub_dotcom_premium'
|
456
|
+
return false if subs.include? 'sub_dotcom_ultimate'
|
457
|
+
return false if subs.include? 'sub_edu'
|
458
|
+
return false if subs.include? 'sub_oss'
|
459
|
+
return false if subs.include? 'sub_community_other'
|
460
|
+
|
461
|
+
if subs.include?('sub_usgov_12x5') || subs.include?('sub_usgov_24x7') || account.Support_Instance__c == 'federal-support'
|
462
|
+
global_subs_present = false
|
463
|
+
grouped = account.Zuora__R00N40000001lGjTEAU__r.group_by { |z| z.Zuora__ProductName__c }
|
464
|
+
grouped.each_value do |charges|
|
465
|
+
next if charges.detect { |c| SubscriptionDefinitions.usgov_12x5.include? c.Name }
|
466
|
+
next if charges.detect { |c| SubscriptionDefinitions.usgov_24x7.include? c.Name }
|
467
|
+
next if charges.detect { |c| SubscriptionDefinitions.fedramp.include? c.Name }
|
468
|
+
next if charges.detect { |c| SubscriptionDefinitions.sm_ultimate.include? c.Name } && account.Support_Instance__c == 'federal-support'
|
469
|
+
next if charges.detect { |c| SubscriptionDefinitions.sm_premium.include? c.Name } && account.Support_Instance__c == 'federal-support'
|
470
|
+
next if charges.detect { |c| SubscriptionDefinitions.sm_starter.include? c.Name } && account.Support_Instance__c == 'federal-support'
|
471
|
+
|
472
|
+
global_subs_present = true
|
473
|
+
end
|
474
|
+
return true unless global_subs_present
|
475
|
+
end
|
476
|
+
false
|
477
|
+
end
|
478
|
+
|
445
479
|
##
|
446
480
|
# Provides the String needed to make a specific type of SOQL query
|
447
481
|
#
|
@@ -502,6 +536,7 @@ module Readiness
|
|
502
536
|
Partners_Partner_Type__c,
|
503
537
|
Support_Hold__c,
|
504
538
|
Account_Risk_Level__c,
|
539
|
+
Support_Instance__c,
|
505
540
|
(
|
506
541
|
SELECT
|
507
542
|
Id,
|
@@ -28,8 +28,9 @@ module Readiness
|
|
28
28
|
ticket.requester_id = 379855863520
|
29
29
|
ticket.submitter_id = 379855863520
|
30
30
|
ticket.comment = { html_body: body }
|
31
|
-
ticket.subject =
|
31
|
+
ticket.subject = ticket_subject
|
32
32
|
ticket.tags = %w[support_internal_request support_valid_request support_ir_sa_request_for_support]
|
33
|
+
ticket.tags.push("support_internal_request_category_#{category}")
|
33
34
|
ticket.priority = request_priority
|
34
35
|
ticket.status = 'new'
|
35
36
|
ticket.ticket_form_id = 12829030177948
|
@@ -176,6 +177,79 @@ module Readiness
|
|
176
177
|
@collab_project ||= ENV.fetch('INTERNAL_REQUEST_SUPPORT_SA_COLLAB_PROJECT')
|
177
178
|
end
|
178
179
|
|
180
|
+
##
|
181
|
+
# Sets the global variable ticket_subject
|
182
|
+
#
|
183
|
+
# @author Jason Colyer
|
184
|
+
# @since 1.0.131
|
185
|
+
def self.ticket_subject
|
186
|
+
@ticket_subject ||= ENV.fetch('INTERNAL_REQUEST_SUPPORT_SA_SUBJECT', 'Support Internal Request - SA - Request for Support')
|
187
|
+
end
|
188
|
+
|
189
|
+
##
|
190
|
+
# Sets the global variable issue_description
|
191
|
+
#
|
192
|
+
# @author Jason Colyer
|
193
|
+
# @since 1.0.131
|
194
|
+
def self.issue_description
|
195
|
+
@issue_description ||= ENV.fetch('INTERNAL_REQUEST_SUPPORT_SA_DESCRIPTION')
|
196
|
+
end
|
197
|
+
|
198
|
+
##
|
199
|
+
# Sets the global variable internal_request_support_sa_context
|
200
|
+
#
|
201
|
+
# @author Jason Colyer
|
202
|
+
# @since 1.0.131
|
203
|
+
def self.context
|
204
|
+
@context ||= ENV.fetch('INTERNAL_REQUEST_SUPPORT_SA_CONTEXT')
|
205
|
+
end
|
206
|
+
|
207
|
+
##
|
208
|
+
# Sets the global variable replication
|
209
|
+
#
|
210
|
+
# @author Jason Colyer
|
211
|
+
# @since 1.0.131
|
212
|
+
def self.replication
|
213
|
+
@replication ||= ENV.fetch('INTERNAL_REQUEST_SUPPORT_SA_REPLICATION', '')
|
214
|
+
end
|
215
|
+
|
216
|
+
##
|
217
|
+
# Sets the global variable arr_at_risk
|
218
|
+
#
|
219
|
+
# @author Jason Colyer
|
220
|
+
# @since 1.0.131
|
221
|
+
def self.arr_at_risk
|
222
|
+
@arr_at_risk ||= ENV.fetch('INTERNAL_REQUEST_SUPPORT_SA_ARR', '0')
|
223
|
+
end
|
224
|
+
|
225
|
+
##
|
226
|
+
# Sets the global variable category
|
227
|
+
#
|
228
|
+
# @author Jason Colyer
|
229
|
+
# @since 1.0.131
|
230
|
+
def self.category
|
231
|
+
@category ||= ENV.fetch('INTERNAL_REQUEST_SUPPORT_SA_CATEGORY', 'other')
|
232
|
+
end
|
233
|
+
|
234
|
+
## Determines category value from global variable
|
235
|
+
#
|
236
|
+
#@author Jason Colyer
|
237
|
+
# @since 1.0.131
|
238
|
+
def self.category_value
|
239
|
+
case category
|
240
|
+
when 'lnr'
|
241
|
+
'L&R (License & Registration)'
|
242
|
+
when 'com'
|
243
|
+
'GitLab.com'
|
244
|
+
when 'sm'
|
245
|
+
'Self-Managed'
|
246
|
+
when 'dedicated'
|
247
|
+
'GitLab Dedicated'
|
248
|
+
else
|
249
|
+
'Unknown'
|
250
|
+
end
|
251
|
+
end
|
252
|
+
|
179
253
|
##
|
180
254
|
# Return the ticket body
|
181
255
|
#
|
@@ -202,6 +276,8 @@ module Readiness
|
|
202
276
|
<li>#{Readiness::SupportSuperFormProcessor::Shared.sfdc_account_string(sfdc_account)}</li>
|
203
277
|
<li>#{Readiness::SupportSuperFormProcessor::Shared.sfdc_opportunity_string(sfdc_opportunity)}</li>
|
204
278
|
<li>#{collab_project.empty? ? 'No collaboration project project' : "<a href='#{collab_project}' target='_blank'>Collaboration Project</a>"}</li>
|
279
|
+
<li>ARR at risk: $#{sprintf("%.2f", arr_at_risk.to_f)}</li>
|
280
|
+
<li>Request category: #{category_value}</li>
|
205
281
|
</ul>
|
206
282
|
<p>
|
207
283
|
What is expected from Support?
|
@@ -209,6 +285,24 @@ module Readiness
|
|
209
285
|
<pre>
|
210
286
|
#{expectations}
|
211
287
|
</pre>
|
288
|
+
<p>
|
289
|
+
Issue description
|
290
|
+
</p>
|
291
|
+
<pre>
|
292
|
+
#{issue_description}
|
293
|
+
</pre>
|
294
|
+
<p>
|
295
|
+
Context/resources
|
296
|
+
</p>
|
297
|
+
<pre>
|
298
|
+
#{context}
|
299
|
+
</pre>
|
300
|
+
<p>
|
301
|
+
Replication information
|
302
|
+
</p>
|
303
|
+
<pre>
|
304
|
+
#{replication}
|
305
|
+
</pre>
|
212
306
|
STRING
|
213
307
|
end
|
214
308
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab_support_readiness
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.131
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Colyer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|