From 03bb676d70ea4c9fdee6071a85ab6c86cda117d2 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Tue, 5 Nov 2024 22:54:04 +0100 Subject: [PATCH] newModuleTagger: add some extra error handling --- newModuleTagger/find_prs.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/newModuleTagger/find_prs.py b/newModuleTagger/find_prs.py index 330040e..c8d3dce 100755 --- a/newModuleTagger/find_prs.py +++ b/newModuleTagger/find_prs.py @@ -33,7 +33,10 @@ def print_pr(pr): def find_prs_without_new_module_tag(): - prs = _gh(["pr", "list", "--json", JSON_FIELDS, "--limit", "1000", "--label", "8.has: module (update)"]) + prs = _gh(["pr", "list", "--json", JSON_FIELDS, "--limit", "50", "--label", "8.has: module (update)"]) + if prs is None: + print("gh exited with error") + exit(1) prs = json.loads(prs) for pr in reversed(prs): if any(label["name"] == "8.has: module (new)" for label in pr["labels"]): @@ -47,4 +50,5 @@ def find_prs_without_new_module_tag(): if __name__ == "__main__": - find_prs_without_new_module_tag() \ No newline at end of file + find_prs_without_new_module_tag() +