Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Shopify CLI plugin #397

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Add Shopify CLI plugin #397

wants to merge 3 commits into from

Conversation

ammiranda
Copy link

Overview

Adding a shell-plugin for the Shopify CLI.

Type of change

  • Created a new plugin
  • Improved an existing plugin
  • Fixed a bug in an existing plugin
  • Improved contributor utilities or experience

Related Issue(s)

How To Test

shopify theme dev

Changelog

Adds the Shopify CLI plugin.

@ammiranda ammiranda changed the title Adding Shopify CLI plugin Add Shopify CLI plugin Oct 29, 2023
Copy link
Member

@hculea hculea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

return schema.CredentialType{
Name: credname.CLIToken,
DocsURL: sdk.URL("https://shopify.dev/docs/apps/tools/cli/ci-cd#step-2-generate-a-cli-authentication-token"),
ManagementURL: sdk.URL("https://partners.shopify.com/"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the management URL, the intention is to have a URL that would direct the user, if signed in, to a page where they can create a new credential for the service. This looks to be a marketing page instead, is there another link that we can use here?

func CLIToken() schema.CredentialType {
return schema.CredentialType{
Name: credname.CLIToken,
DocsURL: sdk.URL("https://shopify.dev/docs/apps/tools/cli/ci-cd#step-2-generate-a-cli-authentication-token"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +38 to +40
var defaultEnvVarMapping = map[string]sdk.FieldName{
"SHOPIFY_TOKEN": fieldname.Token,
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please provide some docs on SHOPIFY_TOKEN? I haven't been able to find this envvar anywhere in the docs.

)}
}

var defaultEnvVarMapping = map[string]sdk.FieldName{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: From this page

https://shopify.dev/docs/apps/tools/cli/ci-cd#step-2-generate-a-cli-authentication-token

It looks like SHOPIFY_API_KEY may also be a requirement? Not sure if the local use-case of the CLI is different than CI/CD.

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.

New plugin: Shopify
2 participants