-
Notifications
You must be signed in to change notification settings - Fork 271
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
Website: Query API options to preconfigure the GitHub export form #1174
Conversation
These all seem fine, but they are also adding a set of new options that represents a large percentage of what's already there. Would be good to see these used first in some documentation, or in a typical workflow setup. Could it make sense to expose this as a JSON object in a similar manner to how the Blueprints themselves are given? I don't think I see that as being better, but I wonder how it compares. |
Thank you @dmsnell! I think you're on to something there – as we've discussed in Wrocław it would be nice to perhaps only have one of these that accepts a Base64-encoded value, just to make these form defaults less distracting. Let's explore that if having many of these attributes leads to a general confusion. Otherwise, I'm going to merge this PR as is to unblock experimenting with the documentation. |
Fixes themes and plugins export that got affected by #1174: * Uses the theme/plugin directory as the content root * Uses the adjusted `fromPlaygroundRoot` value instead of the one coming from the form. Closes #1296 ## Testing instructions * Import https://github.com/Automattic/themes/tree/trunk/foam from GitHub and export it immediately. There should be no files changed in the PR. * Confirm https://github.com/adamziel/playground-docs-workflow still works with this PR
Fixes themes and plugins export that got affected by #1174: * Uses the theme/plugin directory as the content root * Uses the adjusted `fromPlaygroundRoot` value instead of the one coming from the form. Closes #1296 ## Testing instructions * Import https://github.com/Automattic/themes/tree/trunk/foam from GitHub and export it immediately. There should be no files changed in the PR. * Confirm https://github.com/adamziel/playground-docs-workflow still works with this PR
Description
Adds a
custom-paths
export type to enable exporting a subset of a directory:Furthermore, it adds new Query API parameters to preconfigure the GitHub export form:
gh-ensure-auth
: If set toyes
, Playground will display a modal to ensure theuser is authenticated with GitHub before proceeding.
ghexport-repo-url
: The URL of the GitHub repository to export to.ghexport-pr-action
: The action to take when exporting (create or update).ghexport-playground-root
: The root directory in the Playground to export from.ghexport-repo-root
: The root directory in the repository to export to.ghexport-content-type
: The content type of the export (plugin, theme, wp-content, custom-paths).ghexport-plugin
: Plugin path. When the content type isplugin
, pre-select the plugin to export.ghexport-theme
: Theme directory name. When the content type istheme
, pre-select the theme to export.ghexport-path
: A path relative toghexport-playground-root
. Can be provided multiple times. When thecontent type is
custom-paths
, it pre-populates the list of paths to export.ghexport-commit-message
: The commit message to use when exporting.ghexport-allow-include-zip
: Whether to offer an option to include a zip file in the GitHubexport (yes, no). Optional. Defaults to
yes
.Related to https://github.com/adamziel/playground-docs-workflow
Testing instructions
custom-paths
mode.Also, click here and confirm you're asked to authenticate with GitHub, the doc editing plugin gets installed, and that you can make changes to docs pages and export them to GitHub as a PR.