Skip to content

Commit 98d2f88

Browse files
committed
Wrap entire command in try/catch
1 parent e55346f commit 98d2f88

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

scripts/src/scverse_template_scripts/cruft_prs.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,17 @@ def main(tag_name: str) -> None:
230230
con = GitHubConnection("scverse-bot", token)
231231
release = get_template_release(con.gh, tag_name)
232232
repo_urls = get_repo_urls(con.gh)
233+
failed = 0
233234
for repo_url in repo_urls:
234-
# TODO just use single-repo we control for testing
235-
if repo_url.endswith("icbi-lab/infercnvpy"):
236-
make_pr(con, release, repo_url)
235+
try:
236+
# TODO just use single-repo we control for testing
237+
if repo_url.endswith("icbi-lab/infercnvpy"):
238+
make_pr(con, release, repo_url)
239+
except Exception as e:
240+
failed += 1
241+
log.error(f"Error updating {repo_url}.", e)
242+
243+
sys.exit(failed > 0)
237244

238245

239246
def cli() -> None:

0 commit comments

Comments
 (0)