Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = "snyk-tags"
version = "2.5.2"
version = "2.5.3"
description = "CLI tool designed to manage tags and attributes at scale"
authors = ["EricFernandezSnyk <eric.fernandez@snyk.io>"]
license = "MIT"
Expand Down
6 changes: 3 additions & 3 deletions snyk_tags/attribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import typer
from rich import print
from snyk import SnykClient
from typing import Dict
from typing import Dict, Any

from snyk_tags import __app_name__, __version__

Expand Down Expand Up @@ -96,8 +96,8 @@ def apply_attributes_to_projects(
criticality: list,
environment: list,
lifecycle: list,
tenant: str,
filters: Dict[str, any],
tenant: str = "",
filters: Dict[str, Any] = {},
) -> None:
with create_client(token=token, tenant=tenant) as client:
for org_id in org_ids:
Expand Down
14 changes: 7 additions & 7 deletions snyk_tags/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import typer
from rich import print
from snyk import SnykClient
from typing import Dict
from typing import Dict, Any

from snyk_tags import __app_name__, __version__, attribute, github

Expand Down Expand Up @@ -75,8 +75,8 @@ def apply_tags_to_projects(
name: str,
tag: str,
key: str,
tenant: str,
filters: Dict[str, any],
tenant: str = "",
filters: Dict[str, Any] = {},
) -> None:
with create_client(token=token, tenant=tenant) as client:
for org_id in org_ids:
Expand Down Expand Up @@ -149,7 +149,7 @@ def tag(
),
tenant: str = typer.Option(
"", # Default value of comamand
help=f"Defaults to US tenant (app.snyk.io), add 'eu', 'au' or 'us' to use alternative regional tenant. Use --tenant to change tenant.",
help="Defaults to US tenant (app.snyk.io), add 'eu', 'au' or 'us' to use alternative regional tenant. Use --tenant to change tenant.",
),
tagKey: str = typer.Option(
..., help="Tag key: identifier of the tag" # Default value of comamand
Expand All @@ -163,7 +163,7 @@ def tag(
bold=True,
fg=typer.colors.MAGENTA,
)
apply_tags_to_projects(snyktkn, [org_id], target, tagValue, tagKey, tenant=tenant)
apply_tags_to_projects(snyktkn, [org_id], target, tagValue, tagKey, tenant)


# Collection command to apply the attributes to the collection
Expand Down Expand Up @@ -194,7 +194,7 @@ def attributes(
),
tenant: str = typer.Option(
"", # Default value of comamand
help=f"Defaults to US tenant (app.snyk.io), add 'eu', 'au' or 'us' to use alternative regional tenant. Use --tenant to change tenant.",
help="Defaults to US tenant (app.snyk.io), add 'eu', 'au' or 'us' to use alternative regional tenant. Use --tenant to change tenant.",
),
):
typer.secho(
Expand All @@ -209,5 +209,5 @@ def attributes(
[criticality],
[environment],
[lifecycle],
tenant=tenant,
tenant,
)
Loading