fix(ci): paginate upstream ci lookup
Validators (Pushes and Pull Requests) / validate-ui-and-storage (push) Successful in 17s
Validators (Pushes and Pull Requests) / validate-core (push) Successful in 2m1s

This commit is contained in:
2026-07-12 23:36:42 +09:00
parent d897438675
commit 1a235a171d
+5 -2
View File
@@ -132,12 +132,13 @@ jobs:
print("✓ Workflow dispatch mode — upstream CI validation skipped") print("✓ Workflow dispatch mode — upstream CI validation skipped")
sys.exit(0) sys.exit(0)
url = f"https://gitea.taxbaik.com/api/v1/repos/{repo}/actions/runs?limit=20" matched_ci = None
for page in range(1, 6):
url = f"https://gitea.taxbaik.com/api/v1/repos/{repo}/actions/runs?limit=50&page={page}"
req = urllib.request.Request(url, headers={"Authorization": f"token {token}"}) req = urllib.request.Request(url, headers={"Authorization": f"token {token}"})
with urllib.request.urlopen(req, timeout=30) as resp: with urllib.request.urlopen(req, timeout=30) as resp:
payload = json.load(resp) payload = json.load(resp)
matched_ci = None
for run in payload.get("workflow_runs", []): for run in payload.get("workflow_runs", []):
path = str(run.get("path") or "") path = str(run.get("path") or "")
if "ci.yml@" not in path: if "ci.yml@" not in path:
@@ -149,6 +150,8 @@ jobs:
continue continue
matched_ci = run matched_ci = run
break break
if matched_ci:
break
if not matched_ci: if not matched_ci:
print("ERROR: No successful ci.yml run found for the release SHA") print("ERROR: No successful ci.yml run found for the release SHA")