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

PR Preview: document and simplify targetParams #2052

Merged
merged 3 commits into from
Dec 10, 2024

Conversation

ajotka
Copy link
Contributor

@ajotka ajotka commented Dec 4, 2024

I added missing small documentation about structure of targetParams in PR Preview modals.

  • simplify condition of checking pull structure.

Small improvement.

@@ -13,16 +13,20 @@ interface PreviewPRFormProps {

const urlParams = new URLSearchParams(window.location.search);

// This structure is from plugin-proxy.php
// where we set allowed inputs for WordPress and Gutenberg repositories
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice comment!

export const targetParams = {
wordpress: {
repo: 'wordpress-develop',
workflow: 'Test%20Build%20Processes',
artifact: 'wordpress-build-',
pull: 'github.com/wordpress/wordpress-develop/pull'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to think of a more descriptive name, such as baseUrl, but there's no https:// here which makes it more difficult. Let's go with pull for now.

@adamziel adamziel merged commit 0314ce5 into WordPress:trunk Dec 10, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants