Skip to content

Commit 98a2b36

Browse files
committed
Simplified getting the image id from quay.io.
1 parent cc7fb37 commit 98a2b36

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/quayio/scanner/image.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ def raw_image
4444

4545
@raw_image = begin
4646
JSON.parse(
47-
RestClient.get("https://quay.io/api/v1/repository/#{repo}/image",
47+
RestClient.get("https://quay.io/api/v1/repository/#{repo}/tag/#{tag}/images",
4848
authorization: "Bearer #{quayio_token}", accept: :json)
49-
)['images'].detect { |i| i['tags'].include?(tag) }
49+
)['images'].first
5050
rescue RestClient::ExceptionWithResponse => err
5151
return nil if err.http_code == 404 # ignore unknown repos
5252
raise err

0 commit comments

Comments
 (0)