-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Workflows: test to check for label and skip backport changelog #61808
Workflows: test to check for label and skip backport changelog #61808
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
This pull request has changed or added PHP files. Please confirm whether these changes need to be synced to WordPress Core, and therefore featured in the next release of WordPress. If so, it is recommended to create a new Trac ticket and submit a pull request to the WordPress Core Github repository soon after this pull request is merged. If you're unsure, you can always ask for help in the #core-editor channel in WordPress Slack. Thank you! ❤️ View changed files❔ lib/class-wp-rest-global-styles-controller-gutenberg.php |
868f3b7
to
daf6c24
Compare
Test PHP change Action
b087b4d
to
519383d
Compare
@@ -31,6 +31,7 @@ jobs: | |||
- name: 'Fetch relevant history from origin' | |||
run: git fetch origin ${{ github.event.pull_request.base.ref }} | |||
- name: Check CHANGELOG status | |||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'No Core sync required') }} |
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.
The target label could easily be "Backport from WordPress Core", but there might be other scenarios where a backport isn't required, e.g., adding gutenberg
text domains to i18n translations.
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.
Could we have multiple target labels? It would be really handy to look at "Backport from WordPress Core" too!
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.
Good call. I'll test.
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.
Done in 2ac0b2b
@@ -1,6 +1,6 @@ | |||
<?php | |||
/** | |||
* REST API: Try: bundle WP_Theme_JSON class instead of inheriting per WordPress version class | |||
* REST API: Bundle WP_Theme_JSON class instead of inheriting per WordPress version class |
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.
Might as well leave this in. 😄
Flaky tests detected in f4f5f3c. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/9178873250
|
An explicit label sounds good, yes 👍 |
@@ -31,6 +31,7 @@ jobs: | |||
- name: 'Fetch relevant history from origin' | |||
run: git fetch origin ${{ github.event.pull_request.base.ref }} | |||
- name: Check CHANGELOG status | |||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'No Core sync required') && !contains(github.event.pull_request.labels.*.name, 'Backport from WordPress Core') }} |
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.
Are there other cases where no core sync is required, or is it just backports from core?
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.
And a nit: could we title case the label? All other labels are, and most likely someone will, which will break the test
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.
Alternatively we could remove the label if you think there's no other types of changes except for backports from core. I think in other cases we should probably add it to the excluded paths.
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.
Are there other cases where no core sync is required, or is it just backports from core?
There are possibly several situations aside from backports:
- Experimental code wrapped in
defined( 'IS_GUTENBERG_PLUGIN' )
- Experimental code in general :)
- Adding
gutenberg
text domains to i18n translations (needed in the plugin, but not in Core) - Gutenberg hotfixes?
- I'm out of ideas.... 😄
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.
And a nit: could we title case the label? All other labels are, and most likely someone will, which will break the test
Good call. Will do, thanks!
Had to see test it for myself 😄 |
Thanks for improving the script! ❤️ |
Agreed, as it enables opting-out but the default is still to require backports. 💯 |
…ress#61808) * Test to check for label and skip check Test PHP change Action * Added extra label check * Sentence case for the label: No Core Sync Required Co-authored-by: ramonjd <ramonopoly@git.wordpress.org> Co-authored-by: tellthemachines <isabel_brison@git.wordpress.org> Co-authored-by: ellatrix <ellatrix@git.wordpress.org> Co-authored-by: priethor <priethor@git.wordpress.org>
…ress#61808) * Test to check for label and skip check Test PHP change Action * Added extra label check * Sentence case for the label: No Core Sync Required Co-authored-by: ramonjd <ramonopoly@git.wordpress.org> Co-authored-by: tellthemachines <isabel_brison@git.wordpress.org> Co-authored-by: ellatrix <ellatrix@git.wordpress.org> Co-authored-by: priethor <priethor@git.wordpress.org>
What?
Follow up to:
Skips the backport changelog check in CI if the "No Core sync required" label is applied to a PR.
Why?
Folks might want to add changes that do not require a Core backport, e.g., syncing from Core to Gutenberg.
How?
Add an
if
condition to the action.Testing Instructions
Make a PHP change in a new branch.
The check should fail.
Now add the "No Core sync required" or "Backport from WordPress Core" label
The CI should refresh and the check will not fail.