Skip to content

Remove the redundant GITHUB_TOKEN ref-existence check - #14

Merged
fengmk2 merged 1 commit into
mainfrom
remove-github-token
Jun 28, 2026
Merged

Remove the redundant GITHUB_TOKEN ref-existence check#14
fengmk2 merged 1 commit into
mainfrom
remove-github-token

Conversation

@fengmk2

@fengmk2 fengmk2 commented Jun 28, 2026

Copy link
Copy Markdown
Member

GITHUB_TOKEN was only consulted by the manual POST /-/refs endpoint (via verifyRefExists) to check a commit exists before registering its ref. The supported path is the CI publish action (POST /-/publish), which never uses it; the token was optional and unset in production; and vite-plus is public so the existence check needs no auth anyway.

Removes: GITHUB_TOKEN from env.ts + Env, src/github/verifyRef.ts and its unit test, the verification branch in POST /-/refs, and the doc references. POST /-/refs still registers refs (admin-guarded); it just no longer does the optional GitHub existence check. typecheck clean, 54 tests pass.

GITHUB_TOKEN was only consulted by the manual POST /-/refs endpoint to verify a
commit exists before registering it. The supported integration path is the
publish action (POST /-/publish), which never uses it, and the token was optional
and unset in production. Drop GITHUB_TOKEN from env.ts and the Env interface,
delete src/github/verifyRef.ts and its unit test, strip the verification branch
from POST /-/refs, and update the docs.
@fengmk2
fengmk2 force-pushed the remove-github-token branch from a611cb6 to 6528feb Compare June 28, 2026 16:35
@fengmk2
fengmk2 merged commit 97454ca into main Jun 28, 2026
3 checks passed
@fengmk2
fengmk2 deleted the remove-github-token branch June 28, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant