Skip to content

Commit

Permalink
feat: include image cluster in V1 backfill for feature parity
Browse files Browse the repository at this point in the history
  • Loading branch information
lili2311 committed Oct 5, 2023
1 parent 4cb2c1e commit cbf5be3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pysnyk"
version = "0.9.14"
version = "0.9.15"
description = "A Python client for the Snyk API"
authors = [
"Gareth Rushgrove <garethr@snyk.io>",
Expand Down
9 changes: 9 additions & 0 deletions snyk/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,14 @@ def _rest_to_v1_response_format(self, project):
.get("attributes", {})
.get("url")
)
image_cluster = (
project.get("relationships", {})
.get("target", {})
.get("data", {})
.get("meta", {})
.get("integration_data", {})
.get("cluster")
)
return {
"name": attributes.get("name"),
"id": project.get("id"),
Expand All @@ -169,6 +177,7 @@ def _rest_to_v1_response_format(self, project):
"targetReference": attributes.get("target_reference"),
"branch": attributes.get("target_reference"),
"remoteRepoUrl": remote_repo_url,
"imageCluster": image_cluster,
"_tags": attributes.get("tags", []),
"importingUserId": project.get("relationships", {})
.get("importer", {})
Expand Down

0 comments on commit cbf5be3

Please sign in to comment.