| 79 | |
| 80 | |
| 81 | def list_cddl_files(commit): |
| 82 | r = http.request( |
| 83 | "GET", |
| 84 | f"https://api.github.com/repos/{REPO}/contents/{CDDL_PATH}?ref={commit}", |
| 85 | headers=API_HEADERS, |
| 86 | ) |
| 87 | if r.status != 200: |
| 88 | raise RuntimeError(f"Failed to list {CDDL_PATH} at {commit}: HTTP {r.status}") |
| 89 | entries = json.loads(r.data) |
| 90 | # Only the "-all" union of each protocol is consumed; the local/remote splits |
| 91 | # feed nothing (BiDi generation merges the union), so they are not pinned. |
| 92 | return sorted(e["name"] for e in entries if e["type"] == "file" and e["name"].endswith("-all.cddl")) |
| 93 | |
| 94 | |
| 95 | def repo_name(filename): |