From ad40e3799072f5471e2d5eadadf0ae878fcdeadf Mon Sep 17 00:00:00 2001 From: EHotwagner Date: Sat, 24 Oct 2026 21:22:25 +0200 Subject: [PATCH] Audit each registered repository on its default branch (Refs #4753) RecoilEngine's default branch is master; the weekly --remote adoption audit 404ed on ref=main. Co-Authored-By: Claude Sonnet 5.5 --- scripts/check-publication-writer-coverage.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/check-publication-writer-coverage.py b/scripts/check-publication-writer-coverage.py index 8bd68ae37..4229c4e59 100644 --- a/scripts/check-publication-writer-coverage.py +++ b/scripts/check-publication-writer-coverage.py @@ -217,11 +217,12 @@ def fetch(path: str, token: str = "") -> object: def remote_files(repository: str, token: str) -> dict: - listing = fetch(f"/repos/{repository}/contents/.github/workflows?ref=main", token) + branch = fetch(f"/repos/{repository}", token)["default_branch"] # not every repository uses main (RecoilEngine: master) + listing = fetch(f"/repos/{repository}/contents/.github/workflows?ref={branch}", token) files = {} for item in listing: if item["type"] == "file" and item["name"].endswith((".yml", ".yaml")): - body = fetch(f"/repos/{repository}/contents/{item['path']}?ref=main", token) + body = fetch(f"/repos/{repository}/contents/{item['path']}?ref={branch}", token) import base64 files[item["path"]] = base64.b64decode(body["content"]).decode() return files