Skip to content

Project Management: Add validation for missing GitHub labels configuration#76263

Open
aduth wants to merge 6 commits intotrunkfrom
fix/github-labeler-missing
Open

Project Management: Add validation for missing GitHub labels configuration#76263
aduth wants to merge 6 commits intotrunkfrom
fix/github-labeler-missing

Conversation

@aduth
Copy link
Member

@aduth aduth commented Mar 6, 2026

What?

  • Adds validation that the "auto-labeler" configuration includes entries for every package
  • Adds missing configuration if labels exist
  • Exempts packages that are unlabeled

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 in packages/. 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:

git co github-labeler-missing -- .github/scripts/validate-labeler-config.sh
chmod +x .github/scripts/validate-labeler-config.sh
.github/scripts/validate-labeler-config.sh
[...]
The following packages are missing from .github/labeler.yml:
  - packages/abilities
  - packages/admin-ui
  - packages/annotations
  - packages/asset-loader
  - packages/babel-plugin-import-jsx-pragma
  - packages/babel-plugin-makepot
  - packages/babel-preset-default

@aduth aduth requested a review from priethor March 6, 2026 19:04
@aduth aduth added the [Type] Project Management Meta-issues related to project management of Gutenberg label Mar 6, 2026
@github-actions
Copy link

github-actions bot commented Mar 6, 2026

Flaky tests detected in 9fab855.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/22779239332
📝 Reported issues:

aduth added 4 commits March 6, 2026 14:34
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.
@aduth
Copy link
Member Author

aduth commented Mar 6, 2026

Fails as expected prior to fixes: (see logs)

image

@aduth aduth marked this pull request as ready for review March 6, 2026 19:44
@aduth aduth requested a review from desrosj as a code owner March 6, 2026 19:44
@github-actions
Copy link

github-actions bot commented Mar 6, 2026

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: aduth <aduth@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

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

Labels

[Type] Project Management Meta-issues related to project management of Gutenberg

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant