-
Notifications
You must be signed in to change notification settings - Fork 275
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
Throw an error when activating a theme or plugin that doesn't exist #1391
Conversation
This would detect one type of error, but there may be others. How about checking it |
…stream repo isn't allowed (#1392) When the GitHub export flow used a forked repository, it would still attempt to create a branch in the upstream repository. This resulted in the following cryptic error: > There was an unexpected error (Not Found), please try again. If the > problem persists, please report it at https://github.com/WordPress/ > wordpress-playground/issues. This PR ensures that branch is created in the push target ## Testing instructions 1. Import an `upsidedown` theme from https://github.com/Automattic/themes 2. Run `await playground.writeFile('/wordpress/wp-content/themes/upsidedown/test.txt', 'test');` in devtools 3. Try to export the changes as a PR, confirm a PR got created Closes #1367
export const prepareLogMessage = (message: string) => { | ||
return message.replace(/\t/g, ''); | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated to the PR. It removes tabs from log messages.
I was able to add it for plugins, but not for themes. |
packages/playground/blueprints/src/lib/steps/activate-plugin.ts
Outdated
Show resolved
Hide resolved
packages/playground/blueprints/src/lib/steps/activate-plugin.ts
Outdated
Show resolved
Hide resolved
Merging 8f43a9dcfffb770683a00afa4713c08e7d5dfe37 directly to trunk caused E2E failures, I think that step is now broken when |
Sorry about that, I made a mistake and somehow pushed to trunk directly. Thank you for fixing it! |
plugins: ['hello-dolly'], | ||
steps: [{ step: 'enableMultisite' }], | ||
steps: [ | ||
{ step: 'login' }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This step started failing because it was missing the login step.
Without login, the user get's stuck on the login screens instead of being redirected to wp-admin.
Fixes #1347
What is this PR doing?
Throw an error when activating a theme or plugin that doesn't exist.
What problem is it solving?
Users currently don't know when the activate plugin and theme steps fail.
How is the problem addressed?
By checking if the file exists before trying to activate it.
Testing Instructions