newModuleTagger: add retries

This commit is contained in:
2026-07-30 12:36:02 +09:00
parent 8af21cd762
commit 215580c674
+9 -5
View File
@@ -60,11 +60,15 @@ query($endCursor: String) {
def _gh(args: list[str]) -> str | None:
try:
return subprocess.check_output(["gh", *args], text=True)
except subprocess.CalledProcessError as e:
print(e)
return None
for attempt in range(1, MAX_RETRIES + 1):
try:
return subprocess.check_output(["gh", *args], text=True, stderr=subprocess.DEVNULL)
except subprocess.CalledProcessError as e:
if attempt == MAX_RETRIES:
print(e)
return None
time.sleep(RETRY_BACKOFF_SECONDS * attempt)
return None
def find_prs_without_new_module_tag():