Project Management: Add validation for missing GitHub labels configuration#76263
Project Management: Add validation for missing GitHub labels configuration#76263
Conversation
|
Flaky tests detected in 9fab855. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/22779239332
|
Key difference in events: pull_request vs. pull_request_target . pull_request runs in the context of the new branch. pull_request_target runs in the context of the target branch. We need validator to run in new branch so updates to the validation logic are respected. The labeler needs to run in pull_request_target so it has write permissions to modify the label.
|
Fails as expected prior to fixes: (see logs)
|
This reverts commit 18c3470.
|
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. |

What?
Builds on: #52729
Why?
I noticed #76218 was not initially labeled with "[Package] UI". I didn't realize that this was manually managed with configuration in
.github/labeler.yml. While I could have easily just added the configuration, it seems that we should want to keep these in sync with what exists inpackages/. With this workflow, someone adding a new package would see a CI failure that hints them toward updating the labeler configuration.How?
Adds a script and related CI job which validates that each package in
packages/is configured in.github/labeler.yml.I added some exemptions to get things passing with minimal effort, but I might just go ahead and create these labels so we can have as few exceptions as possible.
Testing Instructions
Observe that the initial commit fails CI because it didn't have the updated configuration.
You can also clone it directly into trunk and validate: