fix(review-host): follow GitHub API redirects in release and token checks
Merged
KI
1mo ago+3+3+0123456789-3-3-0123456789
What
apps/review-host/check.sh and apps/review-host/self-update.sh call api.github.com/repos/superset-sh/... with curl and no -L. If a repository's owner or name ever changes, GitHub answers those URLs with a 301 to /repositories/<id>/.... Without -L:
self-update.sh: the latest-release lookup gets an empty body, so the box logs "could not read the latest release" and silently stops updating.check.sh: the release probe fails closed ("version not verified"), and the token probe sees301instead of200and reports the GitHub token as broken.
This adds -L to those three calls (curl -sf โ curl -sfL, curl -s โ curl -sL). The redirect stays on api.github.com, so curl keeps the Authorization header. No behaviour change today: the current URLs return 200 directly.
The other curl calls in apps/review-host already use -L (release tarballs) or hit localhost.
Verification
bash -non both scripts: OK.- Against a real renamed repo (
zeit/hyper, nowvercel/hyper), the exact pipeline from the scripts:- without
-L:tag_name=''(empty, the failure above) - with
-L:tag_name=v3.4.1 - token-style probe:
301without-L; with-Lit reaches/repositories/62367558/pulls/1(that repo has no PR #1, so404, same as calling the new name directly)
- without
- Against today's repo with
-L:desktop-v1.39.0, unchanged.
๐ค Generated with Claude Code
Summary by cubic
Fixes review-host release and token checks to follow GitHub API redirects so the host keeps updating and validating correctly after a repository rename.
- Adds
-Lto the threeapi.github.comcurlcalls incheck.shandself-update.sh. - Without it, GitHub's
301to/repositories/<id>/...returns an empty body:self-update.shsilently stops updating, andcheck.shreports the release as unverified and the token as broken. - Redirects stay on the same host, so the
Authorizationheader is preserved.
Summary by CodeRabbit
- Bug Fixes
- Updated release and pull-request checks to handle redirected GitHub requests, improving reliability when retrieving their responses.