added try/except

pull/16869/head
selmankoc 2 years ago
parent 7b731d7dc8
commit 82d3612637

@ -39,14 +39,16 @@ def create_pr():
branch=branch_name,
)
pr = repo.create_pull(title="Update latest-versions.json",
body="Automated PR to update the latest-versions.json file.",
head=branch_name, base="dev")
try:
pr = repo.create_pull(title="Update latest-versions.json",
body="Automated PR to update the latest-versions.json file.",
head=branch_name, base="dev")
except Exception as e:
print(f"Error while creating PR: {e}")
pr.create_review_request(reviewers=["ebicoglu", "gizemmutukurt", "skoc10"])
pr.create_review_request(reviewers=["gizemmutukurt"])
if __name__ == "__main__":
should_create_pr = update_latest_versions()
if should_create_pr:
create_pr()

Loading…
Cancel
Save