mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-03-08 23:03:55 -05:00
On PR events, github.ref_name resolves to the merge ref (e.g. "1159/merge") which doesn't exist on raw.githubusercontent.com, causing a 404. Use github.head_ref (the actual source branch) for PRs, falling back to ref_name for push events. Also adds -f flag to curl so HTTP errors fail immediately with a clear message instead of silently saving the 404 HTML page.