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

Automate the importing of a theme #6850

Open
pbking opened this issue Feb 1, 2023 · 2 comments
Open

Automate the importing of a theme #6850

pbking opened this issue Feb 1, 2023 · 2 comments

Comments

@pbking
Copy link
Contributor

pbking commented Feb 1, 2023

Goal

When a designer has finished designing a theme they take the exported resources (likely by using the Create Block Theme plugin) and begin the process that will ultimately result in the theme being imported into this Themes repository.

How?

This might work by leveraging Github Actions where the process looks like this:

  • Export the theme .zip file
  • Open a new (special) Issue (appropriately tagged) and attach the exported theme .zip file to it.
  • A Guthub action will then:
    • extract the contents of that zip
    • open a PR associated with the newly opened issue that adds the theme contained in the .zip file to the themes repository and associates it with the user who opened the issue

This then gives us a new branch that any developer or designer can check out to review/change the theme.

@jeffikus
Copy link
Contributor

jeffikus commented Feb 1, 2023

I was looking into the API today, I thought we could do something like this;

1 - authenticate with GH with the designers GH account
2 - create the PR or issue through the API (possible)
3 - add the files/assets to the PR as commits through the API - this is where I cant seem to find if it's possible.

Do you know of how we could do that? From what I can tell the file upload interface is only through the web.

@madhusudhand
Copy link
Member

madhusudhand commented Feb 7, 2023

I liked this idea of using GH Actions.
To add, this should also address the case where designers can re-upload the zip in the created ticket with updated review comments.
The same GH action can re-do the process, and update the same PR with new changes.

Further thoughts

I am experimenting a bit to try out a plugin for chrome (and/or firefox) as a unified interface that will have all the steps required from creating a PR to publishing to dotOrg/dotCom. Few thoughts are

  1. Create a PR by uploading Zip (either using GH APIs), and it directly takes to create PR link after the upload etc.. (need to check if its possible to use the GH login in the browser directly or need an auth token to do so)
  2. Re-upload the zip with suggested review comments
  3. Have GH Actions on the PR to do some automated checks such as
  • checking for translations in patterns
  • validating images for sizes, compression etc..
  1. Plugin will have a button on the GH UI (like how tampermonkey does), to create next set of PRs for dotCom, submission to dotOrg etc..

But it's a path for the future.

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 a pull request may close this issue.

3 participants