This repository was archived by the owner on Jun 1, 2023. It is now read-only.
Add 2 new env vars: Admin token & store#2269
Merged
isaacroldan merged 3 commits intomainfrom Apr 21, 2022
Merged
Conversation
pepicrft
approved these changes
Apr 21, 2022
3 tasks
4 tasks
4 tasks
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
WHY are these changes introduced?
We need a way to execute some commands (that need Admin API access) without any interaction.
With this PR we introduce two new Environment variables that allow us to set a store and a token (with access to that store).
If provided, a command like
theme pullwill ignore any cached session/store and use the ones from the environment.WHAT is this pull request doing?
SHOPIFY_CLI_ADMIN_AUTH_TOKENto inject a custom admin token and avoid the auth process.SHOPIFY_CLI_STOREso all Admin requests use this store, the user must have access to this store.How to test your changes?
Execute this command to get the list of themes of the given store.
SHOPIFY_CLI_ADMIN_AUTH_TOKEN={your_token} SHOPIFY_CLI_STORE={store-name}.myshopify.com bundle exec shopify theme pullThe provided {your_token} must grant access to {store-name}.
Post-release steps
Update checklist