Duplicate theme and connect to github

Solved

Duplicate theme and connect to github

njsaunders
Shopify Partner
2 0 0

I'd like to duplicate the live theme into an unpublished theme via the API, then connect it to a Github branch.

 

The AI bot on Shopify support seems to imply this is possible:

 

duplicate.png

but when I try I get an error about it not being a proper URL:

 

'{"errors":{"src":["131026583597 is not a valid URL"]}}'
Accepted Solution (1)

SBD_
Shopify Staff
1829 271 414

This is an accepted solution.

Hey @njsaunders 

 

I think the bot is confused here - src is for external zipped themes, e.g. `http://themes.shopify.com/theme.zip`

 

I don't believe there's a way to duplicate themes via the API (other than reading the theme, downloading each file and creating a zip).

 

 

Scott | Developer Advocate @ Shopify 

View solution in original post

Replies 3 (3)

SBD_
Shopify Staff
1829 271 414

This is an accepted solution.

Hey @njsaunders 

 

I think the bot is confused here - src is for external zipped themes, e.g. `http://themes.shopify.com/theme.zip`

 

I don't believe there's a way to duplicate themes via the API (other than reading the theme, downloading each file and creating a zip).

 

 

Scott | Developer Advocate @ Shopify 

njsaunders
Shopify Partner
2 0 0

Ok - Thanks.

 

Is there any way to connect/create a theme to a github branch via the API?

Liam
Shopify Staff
2846 311 811

There are some options for connecting to GitHub brances with the CLI, but our regular APIs don't interact with the GitHub integration. 

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog