-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
print tags for projects #43
base: main
Are you sure you want to change the base?
Conversation
try: | ||
SEMGREP_APP_TOKEN = os.getenv("SEMGREP_APP_TOKEN") | ||
except KeyError: | ||
print("Please set the environment variable SEMGREP_APP_TOKEN") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semgrep found a match
print("Please set the environment variable SEMGREP_APP_TOKEN") | |
logging.info("Please set the environment variable SEMGREP_APP_TOKEN") |
print(project_name) | ||
tags = project['tags'] | ||
for tag in tags: | ||
print(tag) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semgrep found a match
print(tag) | |
logging.info(tag) |
for project in data['projects']: | ||
project_name = project['name'] | ||
print("************") | ||
print(project_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semgrep found a match
print(project_name) | |
logging.info(project_name) |
data = json.loads(r.text) | ||
for project in data['projects']: | ||
project_name = project['name'] | ||
print("************") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semgrep found a match
print("************") | |
logging.info("************") |
sys.exit(f'Get failed: {r.text}') | ||
data = json.loads(r.text) | ||
slug_name = data['deployments'][0].get('slug') | ||
print("Accessing org: " + slug_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semgrep found a match
print("Accessing org: " + slug_name) | |
logging.info(("Accessing org: " + slug_name)) |
@pjzcodes could you review this PR and approve if you agree? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine to me, but I don't really understand why it's a separate file. We already have two instances of scripts that fetch projects under API utilities; it would make more sense to me to add this functionality to one of them.
No description provided.