Skip to content

Commit 69aa099

Browse files
committed
Misc: Fixup accept-expected-changes-from-ci.py
I guess there has been a rename of the URL from `/jobs/` to `/job/`, since the script has been working previously.
1 parent 022a066 commit 69aa099

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

misc/scripts/accept-expected-changes-from-ci.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,10 @@ def main(pr_number: Optional[int], sha_override: Optional[str] = None, force=Fal
336336
check_runs = json.loads(subprocess.check_output(["gh", "api", "--paginate", check_failure_url]).decode("utf-8"))
337337
for check_run in check_runs["check_runs"]:
338338
if check_run["conclusion"] == "failure":
339-
m = re.fullmatch(r"^https://github\.com/([^/]+/[^/]+)/actions/runs/(\d+)(?:/jobs/(\d+))?$", check_run["details_url"])
339+
m = re.fullmatch(r"^https://github\.com/([^/]+/[^/]+)/actions/runs/(\d+)(?:/job/(\d+))?$", check_run["details_url"])
340+
if not m:
341+
LOGGER.error(f"Could not parse details URL for {check_run['name']}: '{check_run['details_url']}'")
342+
continue
340343
nwo = m.group(1)
341344
run_id = m.group(2)
342345
jobs_url = f"https://api.github.com/repos/{nwo}/actions/runs/{run_id}/jobs"

0 commit comments

Comments
 (0)