From 69aa099ed1e74fcbb8e6b51a9551e4df877a5737 Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Wed, 9 Aug 2023 10:44:31 +0200 Subject: [PATCH] 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. --- misc/scripts/accept-expected-changes-from-ci.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/misc/scripts/accept-expected-changes-from-ci.py b/misc/scripts/accept-expected-changes-from-ci.py index 12c1bb21763..47a6bec76ab 100755 --- a/misc/scripts/accept-expected-changes-from-ci.py +++ b/misc/scripts/accept-expected-changes-from-ci.py @@ -336,7 +336,10 @@ def main(pr_number: Optional[int], sha_override: Optional[str] = None, force=Fal check_runs = json.loads(subprocess.check_output(["gh", "api", "--paginate", check_failure_url]).decode("utf-8")) for check_run in check_runs["check_runs"]: if check_run["conclusion"] == "failure": - m = re.fullmatch(r"^https://github\.com/([^/]+/[^/]+)/actions/runs/(\d+)(?:/jobs/(\d+))?$", check_run["details_url"]) + m = re.fullmatch(r"^https://github\.com/([^/]+/[^/]+)/actions/runs/(\d+)(?:/job/(\d+))?$", check_run["details_url"]) + if not m: + LOGGER.error(f"Could not parse details URL for {check_run['name']}: '{check_run['details_url']}'") + continue nwo = m.group(1) run_id = m.group(2) jobs_url = f"https://api.github.com/repos/{nwo}/actions/runs/{run_id}/jobs"