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 Sensei to the allowed repositories for plugin proxy #1079

Merged

Conversation

renatho
Copy link
Contributor

@renatho renatho commented Mar 1, 2024

What is this PR doing?

It adds Sensei to the allowed repositories for plugin proxy.

What problem is it solving?

Allow Sensei to use the plugin proxy, so it can be added to Sensei pull requests. It's a better alternative to https://github.com/Automattic/senseilms-com-plugins/pull/305 because we don't have an extra code and GitHub token to maintain.

How is the problem addressed?

Plugin added to the allowed array.

Testing Instructions

  • Create a GitHub token with the "repo" scope checked for test.
  • Add the token hard coded in the packages/playground/website/public/plugin-proxy.php.
  • Serve the wordpress-playground/packages/playground/website/public with a PHP server.
  • Request /plugin-proxy.php?org=Automattic&repo=sensei&workflow=Plugin%20Build&artifact=sensei-lms-bef4d18c802094cc0eaacc522eefdbac5bcbfa77&pr=7521.
  • Check that the request works properly.

Pending

I still need to see how the PR previewer for Sensei will be. Originally, I was implementing it in https://senseilms.com/playground/ to be used in the PRs. But I still need to take a look now that we're adding the proxy here. I think it will be just to use the playground.wordpress.com with the plugin pointing to the proxy URL and send my blueprint as querystring.

@adamziel
Copy link
Collaborator

adamziel commented Mar 4, 2024

think it will be just to use the playground.wordpress.com with the plugin pointing to the proxy URL

Yup! It would be analogous to what the WordPress core PR previewer does here:

const zipArtifactUrl = `/plugin-proxy.php?org=WordPress&repo=wordpress-develop&workflow=Test%20Build%20Processes&artifact=wordpress-build-${prNumber}&pr=${prNumber}`;

@adamziel adamziel merged commit 372ffa8 into WordPress:trunk Mar 4, 2024
5 checks passed
@adamziel
Copy link
Collaborator

adamziel commented Mar 4, 2024

Thank you @renatho! I went ahead and deployed this PR, you should be able to use the Plugin proxy with Sensei now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants