2 months ago
fdcd5d9* fix(ci): use GitHub compare API for push-event file list The Triage job in both ci.yml and packaging.yml used `git diff $BEFORE..$AFTER` to collect changed files on push events, but the checkout is shallow (fetch-depth: 1) so the BEFORE SHA is not in local history. This caused `fatal: Invalid revision range` on every push to main, failing CI before any job could run. Use the GitHub compare API (`repos/.../compare/$BEFORE...$AFTER`) instead, which does not depend on local git history. For the zero-SHA (new branch) edge case, use the commits API to list files in the pushed commit. * fix(ci): use local git diff instead of GitHub API for push file list The GitHub compare and commit APIs cap their `files` arrays at 300 entries; `--paginate` cannot extend those arrays. A push changing more than 300 files would silently drop paths from triage, potentially skipping required jobs. Replace the API calls with a local `git diff --name-only`, which has no file-count limit. The shallow-clone problem (the original reason for switching to the API) is solved by fetching the BEFORE commit at depth 1 before diffing. For the zero-SHA (new branch) case, deepen by one to get the parent of AFTER, with a fallback to `git ls-tree` for an initial commit with no parent.
Parentefe8b47