newModuleTagger: add some extra error handling

This commit is contained in:
Oystein Kristoffer Tveit 2024-11-05 22:54:04 +01:00
parent d546de52e0
commit 03bb676d70
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146
1 changed files with 6 additions and 2 deletions

View File

@ -33,7 +33,10 @@ def print_pr(pr):
def find_prs_without_new_module_tag(): 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) prs = json.loads(prs)
for pr in reversed(prs): for pr in reversed(prs):
if any(label["name"] == "8.has: module (new)" for label in pr["labels"]): 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__": if __name__ == "__main__":
find_prs_without_new_module_tag() find_prs_without_new_module_tag()