Skip to content

Commit

Permalink
Added new --addprojecttype functionality to tag
Browse files Browse the repository at this point in the history
  • Loading branch information
EricFernandezSnyk committed Sep 16, 2022
1 parent bf1d3dd commit 5026f81
Show file tree
Hide file tree
Showing 5 changed files with 199 additions and 73 deletions.
72 changes: 27 additions & 45 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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 = "1.0.2"
version = "1.1.0"
description = "CLI tool designed to manage tags and attributes at scale"
authors = ["EricFernandezSnyk <[email protected]>"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion snyk_tags/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# snyk_tags/__init__.py

__app_name__ = "snyk_tags"
__version__ = "1.0.2"
__version__ = "1.1.0"

from logging import ERROR
from sre_constants import SUCCESS
Expand Down
8 changes: 6 additions & 2 deletions snyk_tags/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ def apply_tags_to_projects(
badname = 0
rightname = 0
for project in projects.get("projects"):
if project["name"].startswith(name):
if project["name"].startswith(name + "(") or project["name"].startswith(
name + ":"
):
apply_tag_to_project(
client=client,
org_id=org_id,
Expand Down Expand Up @@ -93,7 +95,9 @@ def apply_github_owner_to_repo(
badname = 0
rightname = 0
for project in projects.get("projects"):
if project["name"].startswith(name):
if project["name"].startswith(name + "(") or project["name"].startswith(
name + ":"
):
repo = g.get_repo(name)
apply_tag_to_project(
client=client,
Expand Down
Loading

0 comments on commit 5026f81

Please sign in to comment.