gitlab_support_readiness 1.0.107 → 1.0.109

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: f818f636d0d4ede0cdc4deb7ddc3766c55494083323688b4e1824eaf379c7e9f
4
- data.tar.gz: a0f927d38db878c0ad5910942dff16fdc47233b2c80db148d66ace3cb21bb15b
3
+ metadata.gz: 39eb80e26ea6a9d845d2960550460270c0814cd42acbb94fb5c2f55acba05de0
4
+ data.tar.gz: a39b2da820bb0dff595e37730524c6e8c45094394da5f49d8c039375744995cb
5
5
  SHA512:
6
- metadata.gz: 61da165d631935cd0a8d45c974b7affb65ce62143430e77b8fc1240e5236618223b5e51ee69590a465e29111f37cb7f14701a0c4a0735c597629d15d7e4d2673
7
- data.tar.gz: 9d87216ba5ef760c5da1da4e58c0f7e0902d1cfc21a2f039b8f4ef9e926666a43dfaf98163579a06c4b077c179274479e578b161589215f5ea99246057894ac4
6
+ metadata.gz: 673e369c3b98af22767d25f7c7f44c59c0fc62772e8c93001927db71a664efc66d8bdf91f81e2109b151ef88f221ed2eb2720d3055c6ed22efc84736bcae8e8b
7
+ data.tar.gz: ff562b6d1caf1c3886c28d5b228b7921f1923efd58c4f0f4d40669fbadb8a50b68c1a630f445710820ed157d6dad6ed9ae27169209d1cbfb08aff5d6e872b856
@@ -118,7 +118,10 @@ module Readiness
118
118
  # # => "https://gitlab.com/gitlab-com/support/support-team-meta/-/issues/5"
119
119
  def self.find(client, group, iid)
120
120
  response = client.connection.get "groups/#{group.id}/epics/#{iid}"
121
- handle_request_error(0, 'GitLab', response.status, { action: 'get', id: epic_id }) unless response.status == 200
121
+ # These endpoints throw a 403 instead of 404 when it does not exist
122
+ return { "message" => "Epic not found" } if response.status == 403
123
+
124
+ handle_request_error(0, 'GitLab', response.status, { action: 'get', id: iid }) unless response.status == 200
122
125
  return Epics.new(Oj.load(response.body)) if response.status == 200
123
126
 
124
127
  Oj.load(response.body)
@@ -145,6 +148,8 @@ module Readiness
145
148
  # # => "https://gitlab.com/gitlab-com/support/support-team-meta/-/issues/5"
146
149
  def self.find!(client, group, iid)
147
150
  response = client.connection.get "groups/#{group.id}/epics/#{iid}"
151
+ # These endpoints throw a 403 instead of 404 when it does not exist
152
+ handle_request_error(1, 'GitLab', 404, { action: 'Find epic', id: iid }) if response.status == 403
148
153
  handle_request_error(1, 'GitLab', response.status, { action: 'Find epic', id: iid }) unless response.status == 200
149
154
  Epics.new(Oj.load(response.body))
150
155
  end
@@ -70,7 +70,7 @@ module Readiness
70
70
  unless project.is_a? Hash
71
71
  iid = link.split('/').last
72
72
  mr = Readiness::GitLab::MergeRequests.find(@gitlab_client, project, iid)
73
- unless mr['message']
73
+ unless mr['message'] || mr['error']
74
74
  tags_to_add.push('gitlab_merge_request_link')
75
75
  tags_to_add.push("#{slug.gsub('/', '_')}_merge_requests_#{iid}")
76
76
  tags_to_add.push("mergerequest~#{slug.gsub('/', '~')}_#{iid}")
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.107
4
+ version: 1.0.109
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-21 00:00:00.000000000 Z
11
+ date: 2025-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport