gitlab_support_readiness 1.0.79 → 1.0.81

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: 6ab152b190b7406096ae4b03761756a7b2f43e8d0645517d9c7f84cbc1613924
4
- data.tar.gz: 32bafb426a9d9f4e35de48b51648701888688df628954052f4a5c620cd552e93
3
+ metadata.gz: 8de60a82bcf4a6b35eac73b1697f9a10c1c6174de6a22b925faa18b7e451c9f9
4
+ data.tar.gz: 65f6fe7d4ee66de7f50f30cb3342e1f4d01ed3daebcd190045105548693e1d24
5
5
  SHA512:
6
- metadata.gz: aac4f379c49a9facb457c893bccc16f6e7482b3045782a5da938102bf6dbe67a063b5ce0cec13ecffb989bbe6d661d91f12e8632eadca295811e26e046959017
7
- data.tar.gz: dcbc8d4ec205911e789de683b4b84e12ae66deb757b0306d3ddad9c74e037c7fcb152ca4b04dd6c5cac5bc33aff912ee182d4badab63b874a90796868f67a5d7
6
+ metadata.gz: 8d606da08fb8afdda157f096de4ab2b54dd97ac649be47ee93679959eaab847aeff6a26ae29a606829c1c7bc6179ef6b2c402ccc5211bf1a37b3e161c326fd56
7
+ data.tar.gz: 94b837578299e1d5586465d9a72b6f8d5dc71562799bc0e2dc058df742abfbef7e49907fa30b82fd2ca6b5161d1c96c8519df08f2a3df8d700365fe34e142169
@@ -21,7 +21,7 @@ module Readiness
21
21
  @zendesk_client = zendesk_client
22
22
  requester
23
23
  zd_user
24
- unless Readiness::GitLab::Namespaces.exists?(@gitlab_admin_client, namespace_provided)
24
+ unless Readiness::SupportSuperFormProcessor::Shared.namespace_exists?(@gitlab_admin_client, namespace_provided)
25
25
  Readiness::SupportSuperFormProcessor::Shared.invalid_namespace(requester_email, namespace_provided)
26
26
  end
27
27
  @namespace = Readiness::GitLab::Namespaces.find!(@gitlab_admin_client, namespace_provided)
@@ -21,7 +21,7 @@ module Readiness
21
21
  @zendesk_client = zendesk_client
22
22
  requester
23
23
  zd_user
24
- unless Readiness::GitLab::Namespaces.exists?(@gitlab_admin_client, namespace_provided)
24
+ unless Readiness::SupportSuperFormProcessor::Shared.namespace_exists?(@gitlab_admin_client, namespace_provided)
25
25
  Readiness::SupportSuperFormProcessor::Shared.invalid_namespace(requester_email, namespace_provided)
26
26
  end
27
27
  @namespace = Readiness::GitLab::Namespaces.find!(@gitlab_admin_client, namespace_provided)
@@ -21,7 +21,7 @@ module Readiness
21
21
  @zendesk_client = zendesk_client
22
22
  requester
23
23
  zd_user
24
- unless Readiness::GitLab::Namespaces.exists?(@gitlab_admin_client, namespace_provided)
24
+ unless Readiness::SupportSuperFormProcessor::Shared.namespace_exists?(@gitlab_admin_client, namespace_provided)
25
25
  Readiness::SupportSuperFormProcessor::Shared.invalid_namespace(requester_email, namespace_provided)
26
26
  end
27
27
  @namespace = Readiness::GitLab::Namespaces.find!(@gitlab_admin_client, namespace_provided)
@@ -21,7 +21,7 @@ module Readiness
21
21
  @zendesk_client = zendesk_client
22
22
  requester
23
23
  zd_user
24
- unless Readiness::GitLab::Namespaces.exists?(@gitlab_admin_client, namespace_provided)
24
+ unless Readiness::SupportSuperFormProcessor::Shared.namespace_exists?(@gitlab_admin_client, namespace_provided)
25
25
  Readiness::SupportSuperFormProcessor::Shared.invalid_namespace(requester_email, namespace_provided)
26
26
  end
27
27
  @namespace = Readiness::GitLab::Namespaces.find!(@gitlab_admin_client, namespace_provided)
@@ -27,7 +27,7 @@ module Readiness
27
27
  if seats.to_i > 25 || Date.parse(sub_end_date) > (Date.today + 1.years)
28
28
  Readiness::SupportSuperFormProcessor::Shared.invalid_nfr_request(requester_email)
29
29
  end
30
- unless Readiness::GitLab::Namespaces.exists?(@gitlab_admin_client, namespace_provided)
30
+ unless Readiness::SupportSuperFormProcessor::Shared.namespace_exists?(@gitlab_admin_client, namespace_provided)
31
31
  Readiness::SupportSuperFormProcessor::Shared.invalid_namespace(requester_email, namespace_provided)
32
32
  end
33
33
  @namespace = Readiness::GitLab::Namespaces.find!(@gitlab_admin_client, namespace_provided)
@@ -21,7 +21,7 @@ module Readiness
21
21
  @zendesk_client = zendesk_client
22
22
  requester
23
23
  zd_user
24
- unless Readiness::GitLab::Namespaces.exists?(@gitlab_admin_client, namespace_provided)
24
+ unless Readiness::SupportSuperFormProcessor::Shared.namespace_exists?(@gitlab_admin_client, namespace_provided)
25
25
  Readiness::SupportSuperFormProcessor::Shared.invalid_namespace(requester_email, namespace_provided)
26
26
  end
27
27
  @namespace = Readiness::GitLab::Namespaces.find!(@gitlab_admin_client, namespace_provided)
@@ -21,7 +21,7 @@ module Readiness
21
21
  @zendesk_client = zendesk_client
22
22
  requester
23
23
  zd_user
24
- unless Readiness::GitLab::Namespaces.exists?(@gitlab_admin_client, namespace_provided)
24
+ unless Readiness::SupportSuperFormProcessor::Shared.namespace_exists?(@gitlab_admin_client, namespace_provided)
25
25
  Readiness::SupportSuperFormProcessor::Shared.invalid_namespace(requester_email, namespace_provided)
26
26
  end
27
27
  @namespace = Readiness::GitLab::Namespaces.find!(@gitlab_admin_client, namespace_provided)
@@ -21,7 +21,7 @@ module Readiness
21
21
  @zendesk_client = zendesk_client
22
22
  requester
23
23
  zd_user
24
- unless Readiness::GitLab::Namespaces.exists?(@gitlab_admin_client, namespace_provided)
24
+ unless Readiness::SupportSuperFormProcessor::Shared.namespace_exists?(@gitlab_admin_client, namespace_provided)
25
25
  Readiness::SupportSuperFormProcessor::Shared.invalid_namespace(requester_email, namespace_provided)
26
26
  end
27
27
  @namespace = Readiness::GitLab::Namespaces.find!(@gitlab_admin_client, namespace_provided)
@@ -21,7 +21,7 @@ module Readiness
21
21
  @zendesk_client = zendesk_client
22
22
  requester
23
23
  zd_user
24
- unless Readiness::GitLab::Namespaces.exists?(@gitlab_admin_client, namespace_provided)
24
+ unless Readiness::SupportSuperFormProcessor::Shared.namespace_exists?(@gitlab_admin_client, namespace_provided)
25
25
  Readiness::SupportSuperFormProcessor::Shared.invalid_namespace(requester_email, namespace_provided)
26
26
  end
27
27
  @namespace = Readiness::GitLab::Namespaces.find!(@gitlab_admin_client, namespace_provided)
@@ -10,6 +10,19 @@ module Readiness
10
10
  # @author Jason Colyer
11
11
  # @since 1.0.42
12
12
  class Shared < Readiness::Client
13
+ ##
14
+ # Performs a gitlab.com namespace check
15
+ #
16
+ # @author Jason Colyer
17
+ # @since 1.0.81
18
+ # @param client [Object] An instance of {Readiness::GitLab::Client}
19
+ # @param email [String] The email to search for
20
+ def self.namespace_exists?(client, namespace)
21
+ return Readiness::GitLab::Namespaces.exists?(client, namespace) if namespace.to_i.zero?
22
+
23
+ Readiness::GitLab::Namespaces.find(client, namespace).is_a? Readiness::GitLab::Namespaces
24
+ end
25
+
13
26
  ##
14
27
  # Performs a gitlab.com user check
15
28
  #
@@ -66,7 +79,7 @@ module Readiness
66
79
  email.from = 'GitLab Support <techsupport@gitlab.com>'
67
80
  email.to = address
68
81
  email.subject = 'Invalid Support Super Form submission'
69
- email.text = no_such_zendesk_user_message(email)
82
+ email.text = no_such_zendesk_user_message(address)
70
83
  Readiness::Mailgun::Emails.send!(mailgun_client, email)
71
84
  puts "No such Zendesk account tied to #{address}"
72
85
  exit 0
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.79
4
+ version: 1.0.81
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Colyer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-16 00:00:00.000000000 Z
11
+ date: 2024-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport