Skip to content

Commit 2c12640

Browse files
corrected print statement
1 parent 70882b3 commit 2c12640

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

create_or_update_github_org_secret.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ def create_or_update_organization_secret_github(organization: str, secret_name:
3939
"key_id": os.getenv('PUBLIC_KEY_ID')
4040
}
4141
response = requests.put(github_org_secret_endpoint, headers=headers, json=data)
42-
print(response.json())
43-
print(f"Secret {secret_name} created / updated on {organization} at {ist_now_formatted}")
42+
if response.status_code == '201':
43+
print(f"Secret {secret_name} created {organization} at {ist_now_formatted}")
44+
else:
45+
print(f"Secret {secret_name} updated on {organization} at {ist_now_formatted}")
4446

4547

4648
def main():

0 commit comments

Comments
 (0)