Repository navigation
Authenticate the install.sh preview fetch against the private website repo - #2499
Conversation
… repo (closes #2382, closes #2498) nodespace-website is private, so fetchWebsiteInstallScript()'s anonymous raw.githubusercontent.com request always 404ed regardless of WEBSITE_DEPLOY_TOKEN (that token was only wired to the later push step). The unconditional preview fetch in main()'s Promise.all threw before --push logic ever ran, failing the release workflow's sync-install-script job every time. Pass the token through as an Authorization header and require it unconditionally, since even a dry run needs to read the private repo. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Qk1Gu6aKeyK281gccKRfZr
Code Review SummaryThis is a small, well-targeted fix that correctly diagnoses and resolves the actual root cause of the I also checked the sibling script Review Type: Initial Review (no existing reviews/comments on the PR) Requirements Check:
FindingsCritical IssuesNone. Suggested Improvements
Nitpicks
Verification Performed
Recommendation: APPROVE |
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review: APPROVE (posted as a comment — GitHub blocks self-approval). Full findings in the review comment above.
Summary
sync-install-scriptjob failed on v0.2.8:fetchWebsiteInstallScript()inscripts/publish-install-script.tsfetchedraw.githubusercontent.comanonymously, which 404s becauseNodeSpaceAI/nodespace-websiteis a private repo.WEBSITE_DEPLOY_TOKENwas only ever wired to the later git-push step, so this unconditional preview fetch (run insidemain()'sPromise.all) threw before--pushlogic was reached.WEBSITE_DEPLOY_TOKENwas also missing as a repo secret entirely; it has been added separately (viagh secret set) so the workflow can authenticate at all.fetchWebsiteInstallScriptnow accepts a token and sends it as anAuthorizationheader;main()passesWEBSITE_DEPLOY_TOKENthrough and requires it unconditionally (a dry run against a private repo needs to read it too, not just push to it).Test plan
bun run testbaseline: 233 files / 4911 tests passedbun run test:scripts: 378 tests passed, includingpublish-install-script.test.ts's existing pure-function coverageWEBSITE_DEPLOY_TOKEN=$(gh auth token) bun run scripts/publish-install-script.ts v0.2.8now succeeds and prints the correct diff (previously 404ed)bun run quality:fixclean (eslint, svelte-check, tsc, cargo fmt/clippy)bun run test:all(pre-push gate) passed on retry — first attempt hit an unrelated flaky perf-timing test (architecture-benchmarks.test.ts, coverage-mode threshold), confirmed to pass in isolation🤖 Generated with Claude Code