gitlab_support_readiness 1.0.109 → 1.0.111
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 +4 -4
- data/lib/support_readiness/repos/triggers.rb +20 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76db68661570a026ab3995ec2a8b9ab882372b5589ed401881844485298ca670
|
4
|
+
data.tar.gz: 1bdb1a5122dca406871c78e1b65449c12422824163384e9bfff4c2d14145b8c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4fe8cce60d44b4874f4d91bb8f1d3d5a6f50c8692e2f066cfc7ff232200d5f8fde8ed837bc9868facfaa294eea4ee2c0230dd00bebc23518afa7dbef7b5b7612
|
7
|
+
data.tar.gz: 81ffcf980569383eb449ad461e47a0f7185d9f7025ebd6e0bad8668e0567a7d9983fb18a54d8691852a84aeb30faff77b64941b0556e5166e1ad9e7de9d05fcd
|
@@ -174,6 +174,16 @@ module Readiness
|
|
174
174
|
def self.convert_names_to_ids(trigger)
|
175
175
|
%w[any all].each do |type|
|
176
176
|
trigger['conditions'][type].each_with_index do |c, i|
|
177
|
+
if c['field'] == 'organization_id'
|
178
|
+
code = c['value']
|
179
|
+
next if code.empty?
|
180
|
+
next if %r{^[0-9]+$}.match code
|
181
|
+
|
182
|
+
search = Readiness::Zendesk::Search.organizations(@zendesk_client, "salesforce_id:#{code}")
|
183
|
+
if search.count == 1
|
184
|
+
trigger['conditions'][type][i]['value'] = search.first.id.to_s
|
185
|
+
end
|
186
|
+
end
|
177
187
|
if c['field'] == 'satisfaction_reason_code'
|
178
188
|
reason = Readiness::Zendesk::SatisfactionReasons.find_by_name(@zendesk_client, c['value'], @satisfaction_reasons)
|
179
189
|
unless reason.nil?
|
@@ -226,6 +236,16 @@ module Readiness
|
|
226
236
|
end
|
227
237
|
end
|
228
238
|
trigger['actions'].each_with_index do |a, i|
|
239
|
+
if a['field'] == 'organization_id'
|
240
|
+
code = a['value']
|
241
|
+
next if code.empty?
|
242
|
+
next if %r{^[0-9]+$}.match code
|
243
|
+
|
244
|
+
search = Readiness::Zendesk::Search.organizations(@zendesk_client, "salesforce_id:#{code}")
|
245
|
+
if search.count == 1
|
246
|
+
trigger['actions'][i]['value'][0] = search.first.id.to_s
|
247
|
+
end
|
248
|
+
end
|
229
249
|
if a['field'] == 'notification_target'
|
230
250
|
if a['value'].first =~ /^Target\:\ /
|
231
251
|
name = a['value'].first.split('Target: ').last
|
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.111
|
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-01
|
11
|
+
date: 2025-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|