gitlab_support_readiness 1.0.41 → 1.0.42

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.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/lib/support_readiness/mailgun/client.rb +2 -1
  3. data/lib/support_readiness/mailgun/emails.rb +1 -1
  4. data/lib/support_readiness/support_super_form_processor/create_article.rb +375 -0
  5. data/lib/support_readiness/support_super_form_processor/create_macro.rb +183 -0
  6. data/lib/support_readiness/support_super_form_processor/edit_macro.rb +161 -0
  7. data/lib/support_readiness/support_super_form_processor/enable_us_government.rb +236 -0
  8. data/lib/support_readiness/support_super_form_processor/global_ir_dotcom_subscriptions_billing_entity_change.rb +218 -0
  9. data/lib/support_readiness/support_super_form_processor/global_ir_dotcom_subscriptions_extension.rb +238 -0
  10. data/lib/support_readiness/support_super_form_processor/global_ir_dotcom_subscriptions_investigate.rb +238 -0
  11. data/lib/support_readiness/support_super_form_processor/global_ir_dotcom_subscriptions_link.rb +213 -0
  12. data/lib/support_readiness/support_super_form_processor/global_ir_dotcom_subscriptions_nfr.rb +224 -0
  13. data/lib/support_readiness/support_super_form_processor/global_ir_dotcom_subscriptions_reset_seat_qsr.rb +194 -0
  14. data/lib/support_readiness/support_super_form_processor/global_ir_dotcom_trials_edit.rb +198 -0
  15. data/lib/support_readiness/support_super_form_processor/global_ir_dotcom_trials_extension.rb +228 -0
  16. data/lib/support_readiness/support_super_form_processor/global_ir_dotcom_trials_over_plan.rb +219 -0
  17. data/lib/support_readiness/support_super_form_processor/global_ir_hackerone_license.rb +172 -0
  18. data/lib/support_readiness/support_super_form_processor/global_ir_oem_license.rb +241 -0
  19. data/lib/support_readiness/support_super_form_processor/global_ir_order_management.rb +267 -0
  20. data/lib/support_readiness/support_super_form_processor/global_ir_other.rb +137 -0
  21. data/lib/support_readiness/support_super_form_processor/global_ir_provison_failure.rb +179 -0
  22. data/lib/support_readiness/support_super_form_processor/global_ir_sm_subscriptions_did_not_receive.rb +191 -0
  23. data/lib/support_readiness/support_super_form_processor/global_ir_sm_subscriptions_multiyear.rb +188 -0
  24. data/lib/support_readiness/support_super_form_processor/global_ir_sm_subscriptions_nfr.rb +215 -0
  25. data/lib/support_readiness/support_super_form_processor/global_ir_sm_subscriptions_resend.rb +188 -0
  26. data/lib/support_readiness/support_super_form_processor/global_ir_sm_subscriptions_scl.rb +194 -0
  27. data/lib/support_readiness/support_super_form_processor/global_ir_sm_subscriptions_temp.rb +234 -0
  28. data/lib/support_readiness/support_super_form_processor/global_ir_sm_trials_edit.rb +203 -0
  29. data/lib/support_readiness/support_super_form_processor/global_ir_sm_trials_extension.rb +233 -0
  30. data/lib/support_readiness/support_super_form_processor/global_ir_sm_trials_new.rb +223 -0
  31. data/lib/support_readiness/support_super_form_processor/global_ir_wider_community_license.rb +247 -0
  32. data/lib/support_readiness/support_super_form_processor/global_set_collaboration_id.rb +151 -0
  33. data/lib/support_readiness/support_super_form_processor/global_set_org_ase.rb +293 -0
  34. data/lib/support_readiness/support_super_form_processor/global_toggle_escalation.rb +142 -0
  35. data/lib/support_readiness/support_super_form_processor/gratis_support_extension.rb +247 -0
  36. data/lib/support_readiness/support_super_form_processor/gratis_support_former_customer.rb +288 -0
  37. data/lib/support_readiness/support_super_form_processor/gratis_support_migration.rb +238 -0
  38. data/lib/support_readiness/support_super_form_processor/gratis_support_other.rb +221 -0
  39. data/lib/support_readiness/support_super_form_processor/gratis_support_prospect.rb +288 -0
  40. data/lib/support_readiness/support_super_form_processor/gratis_support_upgrade.rb +298 -0
  41. data/lib/support_readiness/support_super_form_processor/namespace_availability.rb +213 -0
  42. data/lib/support_readiness/support_super_form_processor/pd_shadow_modification.rb +189 -0
  43. data/lib/support_readiness/support_super_form_processor/sa_request_for_support.rb +214 -0
  44. data/lib/support_readiness/support_super_form_processor/shared.rb +518 -0
  45. data/lib/support_readiness/support_super_form_processor/team_member_license.rb +144 -0
  46. data/lib/support_readiness/support_super_form_processor/two_fa_exemption.rb +260 -0
  47. data/lib/support_readiness/support_super_form_processor/usgov_ir_order_management.rb +252 -0
  48. data/lib/support_readiness/support_super_form_processor/usgov_ir_other.rb +136 -0
  49. data/lib/support_readiness/support_super_form_processor/usgov_ir_sm_subs_did_not_receive.rb +162 -0
  50. data/lib/support_readiness/support_super_form_processor/usgov_ir_sm_subs_multiyear.rb +159 -0
  51. data/lib/support_readiness/support_super_form_processor/usgov_ir_sm_subs_nfr.rb +196 -0
  52. data/lib/support_readiness/support_super_form_processor/usgov_ir_sm_subs_resend.rb +159 -0
  53. data/lib/support_readiness/support_super_form_processor/usgov_ir_sm_subs_scl.rb +160 -0
  54. data/lib/support_readiness/support_super_form_processor/usgov_ir_sm_subs_temp.rb +219 -0
  55. data/lib/support_readiness/support_super_form_processor/usgov_ir_sm_trials_edit.rb +189 -0
  56. data/lib/support_readiness/support_super_form_processor/usgov_ir_sm_trials_extension.rb +219 -0
  57. data/lib/support_readiness/support_super_form_processor/usgov_ir_sm_trials_new.rb +209 -0
  58. data/lib/support_readiness/support_super_form_processor/usgov_set_collaboration_id.rb +151 -0
  59. data/lib/support_readiness/support_super_form_processor/usgov_set_org_ase.rb +295 -0
  60. data/lib/support_readiness/support_super_form_processor.rb +67 -0
  61. data/lib/support_readiness.rb +1 -0
  62. metadata +59 -2
@@ -0,0 +1,215 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Defines the module Readiness.
4
+ module Readiness
5
+ # Defines the module SupportSuperFormProcessor
6
+ module SupportSuperFormProcessor
7
+ ##
8
+ # Defines the class GlobalIRSMSubscriptionsNFR within the module {Readiness::Zendesk}.
9
+ #
10
+ # @author Jason Colyer
11
+ # @since 1.0.42
12
+ class GlobalIRSMSubscriptionsNFR < Readiness::Client
13
+ ##
14
+ # Process a Global Internal Request Self-Managed Subscriptions NFR request
15
+ #
16
+ # @author Jason Colyer
17
+ # @since 1.0.42
18
+ def self.process!(gitlab_client, gitlab_admin_client, zendesk_client)
19
+ @gitlab_client = gitlab_client
20
+ @gitlab_admin_client = gitlab_admin_client
21
+ @zendesk_client = zendesk_client
22
+ requester
23
+ zd_user
24
+ unless zd_user.tags.include? 'partner_support_agent'
25
+ Readiness::SupportSuperFormProcessor::Shared.not_partner_support_member(requester_email)
26
+ end
27
+ if current.to_i > 25 || Date.parse(license_end_date) > (Date.today + 1.years)
28
+ Readiness::SupportSuperFormProcessor::Shared.invalid_nfr_request(requester_email)
29
+ end
30
+ ticket = Readiness::Zendesk::Tickets.new
31
+ ticket.email_cc_ids = [zd_user.id]
32
+ ticket.requester_id = 379855863520
33
+ ticket.submitter_id = 379855863520
34
+ ticket.comment = { html_body: body }
35
+ ticket.subject = 'Internal Request - SM - NFR license request'
36
+ ticket.tags = %w[lnr_internal_request lnr_valid_request lnr_sm_license lnr_sm_nfr]
37
+ ticket.priority = request_priority
38
+ ticket.status = 'new'
39
+ ticket.ticket_form_id = 360000071293
40
+ ticket.custom_fields = [
41
+ { id: 4414446722578, value: 'ticket_group_not_applicable' },
42
+ { id: 360020614420, value: 'aof_lnr' },
43
+ { id: 360020735259, value: 'stage-frt' },
44
+ { id: 360018253094, value: 'all_regions' },
45
+ { id: 360004394559, value: 'free_plan' },
46
+ { id: 360005183820, value: zd_user.name },
47
+ { id: 360005248219, value: zd_user.email },
48
+ { id: 360020735319, value: 'sev3' },
49
+ { id: 360020288373, value: '0' },
50
+ { id: 360014776453, value: 'medium' },
51
+ { id: 6978426204828, value: 'ir_sm_nfr' },
52
+ { id: 6978366086428, value: zd_user.email },
53
+ { id: 45195248, value: 'created_by_agent' }
54
+ ]
55
+ create = Readiness::Zendesk::Tickets.create!(@zendesk_client, ticket)
56
+ puts "Ticket created: https://gitlab.zendesk.com/agent/tickets/#{create.id}"
57
+ end
58
+
59
+ ##
60
+ # Sets the global variable requester
61
+ #
62
+ # @author Jason Colyer
63
+ # @since 1.0.42
64
+ def self.requester
65
+ @requester ||= Readiness::SupportSuperFormProcessor::Shared.gitlab_user_check(@gitlab_admin_client, requester_email)
66
+ end
67
+
68
+ ##
69
+ # Sets the global variable zd_user
70
+ #
71
+ # @author Jason Colyer
72
+ # @since 1.0.42
73
+ def self.zd_user
74
+ @zd_user ||= Readiness::SupportSuperFormProcessor::Shared.zendesk_user_check(@zendesk_client, requester_email)
75
+ end
76
+
77
+ ##
78
+ # Sets the global variable requester_email
79
+ #
80
+ # @author Jason Colyer
81
+ # @since 1.0.42
82
+ def self.requester_email
83
+ @requester_email ||= ENV.fetch('REQUESTER_EMAIL')
84
+ end
85
+
86
+ ##
87
+ # Sets the global variable request_priority
88
+ #
89
+ # @author Jason Colyer
90
+ # @since 1.0.42
91
+ def self.request_priority
92
+ @request_priority ||= ENV.fetch('INTERNAL_REQUEST_GLOBAL_PRIORITY')
93
+ end
94
+
95
+ ##
96
+ # Sets the global variable context
97
+ #
98
+ # @author Jason Colyer
99
+ # @since 1.0.42
100
+ def self.context
101
+ @context ||= ENV.fetch('INTERNAL_REQUEST_GLOBAL_CONTEXT')
102
+ end
103
+
104
+ ##
105
+ # Sets the global variable contact_name
106
+ #
107
+ # @author Jason Colyer
108
+ # @since 1.0.42
109
+ def self.contact_name
110
+ @contact_name ||= ENV.fetch('INTERNAL_REQUEST_GLOBAL_CONTACT_NAME')
111
+ end
112
+
113
+ ##
114
+ # Sets the global variable contact_email
115
+ #
116
+ # @author Jason Colyer
117
+ # @since 1.0.42
118
+ def self.contact_email
119
+ @contact_email ||= ENV.fetch('INTERNAL_REQUEST_GLOBAL_EMAIL')
120
+ end
121
+
122
+ ##
123
+ # Sets the global variable company
124
+ #
125
+ # @author Jason Colyer
126
+ # @since 1.0.42
127
+ def self.company
128
+ @company ||= ENV.fetch('INTERNAL_REQUEST_GLOBAL_COMPANY_NAME')
129
+ end
130
+
131
+ ##
132
+ # Sets the global variable license_end_date
133
+ #
134
+ # @author Jason Colyer
135
+ # @since 1.0.42
136
+ def self.license_end_date
137
+ @license_end_date ||= ENV.fetch('SM_NFR_LICENSE_END_DATE')
138
+ end
139
+
140
+ ##
141
+ # Sets the global variable current
142
+ #
143
+ # @author Jason Colyer
144
+ # @since 1.0.42
145
+ def self.current
146
+ @current ||= ENV.fetch('SM_NFR_LICENSE_SEATS')
147
+ end
148
+
149
+ ##
150
+ # Sets the global variable sfdc_account_link
151
+ #
152
+ # @author Jason Colyer
153
+ # @since 1.0.42
154
+ def self.sfdc_account_link
155
+ @sfdc_account_link ||= ENV.fetch('SM_NFR_LICENSE_PLAN_SFDC_ACCOUNT')
156
+ end
157
+
158
+ ##
159
+ # Sets the global variable plan
160
+ #
161
+ # @author Jason Colyer
162
+ # @since 1.0.42
163
+ def self.plan
164
+ @plan ||= ENV.fetch('SM_NFR_LICENSE_PLAN')
165
+ end
166
+
167
+ ##
168
+ # Returns the ticket body
169
+ #
170
+ # @author Jason Colyer
171
+ # @since 1.0.42
172
+ # @return [String]
173
+ def self.body
174
+ <<~STRING
175
+ <p>
176
+ Greetings,
177
+ </p>
178
+ <p>
179
+ A request has been filed for Self-managed NFR license request.
180
+ </p>
181
+ <p>
182
+ Please note that this is an <b>INTERNAL</b> ticket and should <b>NEVER</b> be shared with anyone. Please do not CC, BCC, forward, or anything else that can send the information from this ticket. <b>NEVER</b> add <i>anyone</i> outside of GitLab to this ticket or communications stemming from this ticket.
183
+ </p>
184
+ <p>
185
+ The information for this is as follows:
186
+ </p>
187
+ <ul>
188
+ <li>Contact's name: #{contact_name}</li>
189
+ <li>
190
+ Contact's email: #{contact_email}
191
+ <a href="https://www.zuora.com/platform/apps/search?searchTerm=#{contact_email}" target='_blank'>(Zuora Search)</a>
192
+ <a href="https://customers.gitlab.com/admin/customer?model_name=customer&query=#{contact_email}" target='_blank'>(Portal Search)</a>
193
+ </li>
194
+ <li>Contact's company: #{company}</li>
195
+ <li>#{Readiness::SupportSuperFormProcessor::Shared.sfdc_account_string(sfdc_account_link)}</li>
196
+ <li>License end date: #{license_end_date}</li>
197
+ <li>User count: #{current}</li>
198
+ <li>Plan: #{plan}</li>
199
+ <li>Trial: Yes</li>
200
+ </ul>
201
+ <p>
202
+ Some additional context for this request is:
203
+ </p>
204
+ <pre>
205
+ #{context}
206
+ </pre>
207
+ <p>
208
+ You can find the workflow for this ticket
209
+ <a href='https://handbook.gitlab.com/handbook/support/license-and-renewals/workflows/self-managed/generating_nfr_licenses/' target='_blank'>here</a>
210
+ </p>
211
+ STRING
212
+ end
213
+ end
214
+ end
215
+ end
@@ -0,0 +1,188 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Defines the module Readiness.
4
+ module Readiness
5
+ # Defines the module SupportSuperFormProcessor
6
+ module SupportSuperFormProcessor
7
+ ##
8
+ # Defines the class GlobalIRSMSubscriptionsResend within the module {Readiness::Zendesk}.
9
+ #
10
+ # @author Jason Colyer
11
+ # @since 1.0.42
12
+ class GlobalIRSMSubscriptionsResend < Readiness::Client
13
+ ##
14
+ # Process a Global Internal Request Self-Managed Subscriptions Resend request
15
+ #
16
+ # @author Jason Colyer
17
+ # @since 1.0.42
18
+ def self.process!(gitlab_client, gitlab_admin_client, zendesk_client)
19
+ @gitlab_client = gitlab_client
20
+ @gitlab_admin_client = gitlab_admin_client
21
+ @zendesk_client = zendesk_client
22
+ requester
23
+ zd_user
24
+ ticket = Readiness::Zendesk::Tickets.new
25
+ ticket.email_cc_ids = [zd_user.id]
26
+ ticket.requester_id = 379855863520
27
+ ticket.submitter_id = 379855863520
28
+ ticket.comment = { html_body: body }
29
+ ticket.subject = 'Internal Request - SM - Forward existing license to an email not on the license'
30
+ ticket.tags = %w[lnr_internal_request lnr_valid_request lnr_sm_license lnr_sm_license_receive_error]
31
+ ticket.priority = request_priority
32
+ ticket.status = 'new'
33
+ ticket.ticket_form_id = 360000071293
34
+ ticket.custom_fields = [
35
+ { id: 4414446722578, value: 'ticket_group_not_applicable' },
36
+ { id: 360020614420, value: 'aof_lnr' },
37
+ { id: 360020735259, value: 'stage-frt' },
38
+ { id: 360018253094, value: 'all_regions' },
39
+ { id: 360004394559, value: 'free_plan' },
40
+ { id: 360005183820, value: zd_user.name },
41
+ { id: 360005248219, value: zd_user.email },
42
+ { id: 360020735319, value: 'sev3' },
43
+ { id: 360020288373, value: '0' },
44
+ { id: 360014776453, value: 'medium' },
45
+ { id: 6978426204828, value: 'ir_sm_resend' },
46
+ { id: 6978366086428, value: zd_user.email },
47
+ { id: 45195248, value: 'created_by_agent' }
48
+ ]
49
+ create = Readiness::Zendesk::Tickets.create!(@zendesk_client, ticket)
50
+ puts "Ticket created: https://gitlab.zendesk.com/agent/tickets/#{create.id}"
51
+ end
52
+
53
+ ##
54
+ # Sets the global variable requester
55
+ #
56
+ # @author Jason Colyer
57
+ # @since 1.0.42
58
+ def self.requester
59
+ @requester ||= Readiness::SupportSuperFormProcessor::Shared.gitlab_user_check(@gitlab_admin_client, requester_email)
60
+ end
61
+
62
+ ##
63
+ # Sets the global variable zd_user
64
+ #
65
+ # @author Jason Colyer
66
+ # @since 1.0.42
67
+ def self.zd_user
68
+ @zd_user ||= Readiness::SupportSuperFormProcessor::Shared.zendesk_user_check(@zendesk_client, requester_email)
69
+ end
70
+
71
+ ##
72
+ # Sets the global variable requester_email
73
+ #
74
+ # @author Jason Colyer
75
+ # @since 1.0.42
76
+ def self.requester_email
77
+ @requester_email ||= ENV.fetch('REQUESTER_EMAIL')
78
+ end
79
+
80
+ ##
81
+ # Sets the global variable request_priority
82
+ #
83
+ # @author Jason Colyer
84
+ # @since 1.0.42
85
+ def self.request_priority
86
+ @request_priority ||= ENV.fetch('INTERNAL_REQUEST_GLOBAL_PRIORITY')
87
+ end
88
+
89
+ ##
90
+ # Sets the global variable context
91
+ #
92
+ # @author Jason Colyer
93
+ # @since 1.0.42
94
+ def self.context
95
+ @context ||= ENV.fetch('INTERNAL_REQUEST_GLOBAL_CONTEXT')
96
+ end
97
+
98
+ ##
99
+ # Sets the global variable contact_name
100
+ #
101
+ # @author Jason Colyer
102
+ # @since 1.0.42
103
+ def self.contact_name
104
+ @contact_name ||= ENV.fetch('INTERNAL_REQUEST_GLOBAL_CONTACT_NAME')
105
+ end
106
+
107
+ ##
108
+ # Sets the global variable contact_email
109
+ #
110
+ # @author Jason Colyer
111
+ # @since 1.0.42
112
+ def self.contact_email
113
+ @contact_email ||= ENV.fetch('INTERNAL_REQUEST_GLOBAL_EMAIL')
114
+ end
115
+
116
+ ##
117
+ # Sets the global variable company
118
+ #
119
+ # @author Jason Colyer
120
+ # @since 1.0.42
121
+ def self.company
122
+ @company ||= ENV.fetch('INTERNAL_REQUEST_GLOBAL_COMPANY_NAME')
123
+ end
124
+
125
+ ##
126
+ # Sets the global variable sfdc_account_link
127
+ #
128
+ # @author Jason Colyer
129
+ # @since 1.0.42
130
+ def self.sfdc_account_link
131
+ @sfdc_account_link ||= ENV.fetch('SM_LICENSE_RESEND_SFDC_ACCOUNT')
132
+ end
133
+
134
+ ##
135
+ # Sets the global variable opp_link
136
+ #
137
+ # @author Jason Colyer
138
+ # @since 1.0.42
139
+ def self.opp_link
140
+ @opp_link ||= ENV.fetch('SM_LICENSE_RESEND_OPP_LINK')
141
+ end
142
+
143
+ ##
144
+ # Returns the ticket body
145
+ #
146
+ # @author Jason Colyer
147
+ # @since 1.0.42
148
+ # @return [String]
149
+ def self.body
150
+ <<~STRING
151
+ <p>
152
+ Greetings,
153
+ </p>
154
+ <p>
155
+ A request has been filed for Forward existing license to an email not on the license.
156
+ </p>
157
+ <p>
158
+ Please note that this is an <b>INTERNAL</b> ticket and should <b>NEVER</b> be shared with anyone. Please do not CC, BCC, forward, or anything else that can send the information from this ticket. <b>NEVER</b> add <i>anyone</i> outside of GitLab to this ticket or communications stemming from this ticket.
159
+ </p>
160
+ <p>
161
+ The information for this is as follows:
162
+ </p>
163
+ <ul>
164
+ <li>Contact's name: #{contact_name}</li>
165
+ <li>
166
+ Contact's email: #{contact_email}
167
+ <a href="https://www.zuora.com/platform/apps/search?searchTerm=#{contact_email}" target='_blank'>(Zuora Search)</a>
168
+ <a href="https://customers.gitlab.com/admin/customer?model_name=customer&query=#{contact_email}" target='_blank'>(Portal Search)</a>
169
+ </li>
170
+ <li>Company: #{company}</li>
171
+ <li>#{Readiness::SupportSuperFormProcessor::Shared.sfdc_account_string(sfdc_account_link)}</li>
172
+ <li>#{Readiness::SupportSuperFormProcessor::Shared.sfdc_opportunity_string(opp_link)}</li>
173
+ </ul>
174
+ <p>
175
+ Some additional context for this request is:
176
+ </p>
177
+ <pre>
178
+ #{context}
179
+ </pre>
180
+ <p>
181
+ You can find the workflow for this ticket
182
+ <a href='https://handbook.gitlab.com/handbook/support/license-and-renewals/workflows/self-managed/sending_license_to_different_email/' target='_blank'>here</a>
183
+ </p>
184
+ STRING
185
+ end
186
+ end
187
+ end
188
+ end
@@ -0,0 +1,194 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Defines the module Readiness.
4
+ module Readiness
5
+ # Defines the module SupportSuperFormProcessor
6
+ module SupportSuperFormProcessor
7
+ ##
8
+ # Defines the class GlobalIRSMSubscriptionsSCL within the module {Readiness::Zendesk}.
9
+ #
10
+ # @author Jason Colyer
11
+ # @since 1.0.42
12
+ class GlobalIRSMSubscriptionsSCL < Readiness::Client
13
+ ##
14
+ # Process a Global Internal Request Self-Managed Subscriptions Strict Cloud Licensing request
15
+ #
16
+ # @author Jason Colyer
17
+ # @since 1.0.42
18
+ def self.process!(gitlab_client, gitlab_admin_client, zendesk_client)
19
+ @gitlab_client = gitlab_client
20
+ @gitlab_admin_client = gitlab_admin_client
21
+ @zendesk_client = zendesk_client
22
+ requester
23
+ zd_user
24
+ ticket = Readiness::Zendesk::Tickets.new
25
+ ticket.email_cc_ids = [zd_user.id]
26
+ ticket.requester_id = 379855863520
27
+ ticket.submitter_id = 379855863520
28
+ ticket.comment = { html_body: body }
29
+ ticket.subject = 'Internal Request - SM - Cloud Licensing exemption'
30
+ ticket.tags = %w[lnr_internal_request lnr_valid_request lnr_sm_license lnr_sm_license_scl]
31
+ ticket.priority = request_priority
32
+ ticket.status = 'new'
33
+ ticket.ticket_form_id = 360000071293
34
+ ticket.custom_fields = [
35
+ { id: 4414446722578, value: 'ticket_group_not_applicable' },
36
+ { id: 360020614420, value: 'aof_lnr' },
37
+ { id: 360020735259, value: 'stage-frt' },
38
+ { id: 360018253094, value: 'all_regions' },
39
+ { id: 360004394559, value: 'free_plan' },
40
+ { id: 360005183820, value: zd_user.name },
41
+ { id: 360005248219, value: zd_user.email },
42
+ { id: 360020735319, value: 'sev3' },
43
+ { id: 360020288373, value: '0' },
44
+ { id: 360014776453, value: 'medium' },
45
+ { id: 6978426204828, value: 'ir_scl_exemption' },
46
+ { id: 6978366086428, value: zd_user.email },
47
+ { id: 45195248, value: 'created_by_agent' }
48
+ ]
49
+ create = Readiness::Zendesk::Tickets.create!(@zendesk_client, ticket)
50
+ puts "Ticket created: https://gitlab.zendesk.com/agent/tickets/#{create.id}"
51
+ end
52
+
53
+ ##
54
+ # Sets the global variable requester
55
+ #
56
+ # @author Jason Colyer
57
+ # @since 1.0.42
58
+ def self.requester
59
+ @requester ||= Readiness::SupportSuperFormProcessor::Shared.gitlab_user_check(@gitlab_admin_client, requester_email)
60
+ end
61
+
62
+ ##
63
+ # Sets the global variable zd_user
64
+ #
65
+ # @author Jason Colyer
66
+ # @since 1.0.42
67
+ def self.zd_user
68
+ @zd_user ||= Readiness::SupportSuperFormProcessor::Shared.zendesk_user_check(@zendesk_client, requester_email)
69
+ end
70
+
71
+ ##
72
+ # Sets the global variable requester_email
73
+ #
74
+ # @author Jason Colyer
75
+ # @since 1.0.42
76
+ def self.requester_email
77
+ @requester_email ||= ENV.fetch('REQUESTER_EMAIL')
78
+ end
79
+
80
+ ##
81
+ # Sets the global variable request_priority
82
+ #
83
+ # @author Jason Colyer
84
+ # @since 1.0.42
85
+ def self.request_priority
86
+ @request_priority ||= ENV.fetch('INTERNAL_REQUEST_GLOBAL_PRIORITY')
87
+ end
88
+
89
+ ##
90
+ # Sets the global variable context
91
+ #
92
+ # @author Jason Colyer
93
+ # @since 1.0.42
94
+ def self.context
95
+ @context ||= ENV.fetch('INTERNAL_REQUEST_GLOBAL_CONTEXT')
96
+ end
97
+
98
+ ##
99
+ # Sets the global variable contact_name
100
+ #
101
+ # @author Jason Colyer
102
+ # @since 1.0.42
103
+ def self.contact_name
104
+ @contact_name ||= ENV.fetch('INTERNAL_REQUEST_GLOBAL_CONTACT_NAME')
105
+ end
106
+
107
+ ##
108
+ # Sets the global variable contact_email
109
+ #
110
+ # @author Jason Colyer
111
+ # @since 1.0.42
112
+ def self.contact_email
113
+ @contact_email ||= ENV.fetch('INTERNAL_REQUEST_GLOBAL_EMAIL')
114
+ end
115
+
116
+ ##
117
+ # Sets the global variable company
118
+ #
119
+ # @author Jason Colyer
120
+ # @since 1.0.42
121
+ def self.company
122
+ @company ||= ENV.fetch('INTERNAL_REQUEST_GLOBAL_COMPANY_NAME')
123
+ end
124
+
125
+ ##
126
+ # Sets the global variable gitlab_version
127
+ #
128
+ # @author Jason Colyer
129
+ # @since 1.0.42
130
+ def self.gitlab_version
131
+ @gitlab_version ||= ENV.fetch('SM_SCL_VERSION')
132
+ end
133
+
134
+ ##
135
+ # Sets the global variable sfdc_account_link
136
+ #
137
+ # @author Jason Colyer
138
+ # @since 1.0.42
139
+ def self.sfdc_account_link
140
+ @sfdc_account_link ||= ENV.fetch('SM_SCL_SFDC_ACCOUNT')
141
+ end
142
+
143
+ ##
144
+ # Sets the global variable chattr_link
145
+ #
146
+ # @author Jason Colyer
147
+ # @since 1.0.42
148
+ def self.chattr_link
149
+ @chattr_link ||= ENV.fetch('SM_SCL_SFDC_CHATTER')
150
+ end
151
+
152
+ ##
153
+ # Returns the ticket body
154
+ #
155
+ # @author Jason Colyer
156
+ # @since 1.0.42
157
+ # @return [String]
158
+ def self.body
159
+ <<~STRING
160
+ <p>
161
+ Greetings,
162
+ </p>
163
+ <p>
164
+ A request has been filed for Cloud Licensing exemption.
165
+ </p>
166
+ <p>
167
+ Please note that this is an <b>INTERNAL</b> ticket and should <b>NEVER</b> be shared with anyone. Please do not CC, BCC, forward, or anything else that can send the information from this ticket. <b>NEVER</b> add <i>anyone</i> outside of GitLab to this ticket or communications stemming from this ticket.
168
+ </p>
169
+ <p>
170
+ The information for this is as follows:
171
+ </p>
172
+ <ul>
173
+ <li>Contact's name: #{contact_name}</li>
174
+ <li>
175
+ Contact's email: #{contact_email}
176
+ <a href="https://www.zuora.com/platform/apps/search?searchTerm=#{contact_email}" target='_blank'>(Zuora Search)</a>
177
+ <a href="https://customers.gitlab.com/admin/customer?model_name=customer&query=#{contact_email}" target='_blank'>(Portal Search)</a>
178
+ </li>
179
+ <li>Company: #{company}</li>
180
+ <li>GitLab Version: #{gitlab_version}</li>
181
+ <li>#{Readiness::SupportSuperFormProcessor::Shared.sfdc_account_string(sfdc_account_link)}</li>
182
+ <li>#{Readiness::SupportSuperFormProcessor::Shared.sfdc_chattr_string(chattr_link)}</li>
183
+ </ul>
184
+ <p>
185
+ Some additional context for this request is:
186
+ </p>
187
+ <pre>
188
+ #{context}
189
+ </pre>
190
+ STRING
191
+ end
192
+ end
193
+ end
194
+ end