Add optional separate source/target Personal Access Tokens - #39
Open
alpipego wants to merge 1 commit into
Open
Conversation
Allow VITE_SOURCE_PERSONAL_ACCESS_TOKEN and VITE_TARGET_PERSONAL_ACCESS_TOKEN so each space can use a least-privilege token: the source token can be scoped read-only, which prevents the tool from ever mutating the source space. Both fall back to VITE_PERSONAL_ACCESS_TOKEN, so existing single-token setups are unaffected. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow the source and target spaces to use different Personal Access Tokens, so each can be scoped with least privilege.
What
Two optional env vars:
VITE_SOURCE_PERSONAL_ACCESS_TOKEN— used only for source-space requestsVITE_TARGET_PERSONAL_ACCESS_TOKEN— used only for target-space requestsBoth fall back to
VITE_PERSONAL_ACCESS_TOKENwhen unset, so existing single-token setups are unaffected.Why
The tool reads from the source and writes to the target with one token today, so that token needs write scope on both spaces. With a separate source token you can scope it read-only (assets + asset folders), which means the tool can never mutate the source space regardless of a bug. The target token keeps the write scopes it needs.
.env.exampleand the readme are updated to document the two optional vars.