Skip to content

PR enforcer workflow: use regex to filter labels starting with [Type] - #72672

Merged
priethor merged 1 commit into
trunkfrom
update/label-enforcer-regex
Oct 29, 2025
Merged

priethor merged 1 commit into
trunkfrom
update/label-enforcer-regex

Conversation

@priethor

@priethor priethor commented Oct 24, 2025 •

Copy link
Copy Markdown
Contributor

What?

Updates the PR label enforcement automation to simply require one and only one label that starts with [Type].

Why?

Maintaining the list with individual labels is not only inconvenient, but indicates an inconsistency in the labels: any type-related label should follow the same prefix!

How?

By using a regular expression.

Updated label requirements for PRs to require any label starting with '[Type]'.
@priethor priethor self-assigned this Oct 24, 2025
@priethor priethor added [Type] Task Issues or PRs that have been broken down into an individual action to take GitHub Actions Pull requests that update GitHub Actions code [Type] Project Management Meta-issues related to project management of Gutenberg and removed [Type] Task Issues or PRs that have been broken down into an individual action to take labels Oct 24, 2025
@priethor
priethor marked this pull request as ready for review October 27, 2025 18:39
@priethor
priethor requested a review from desrosj as a code owner October 27, 2025 18:39
@github-actions

github-actions Bot commented Oct 27, 2025 •

Copy link
Copy Markdown

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: priethor <priethor@git.wordpress.org>
Co-authored-by: desrosj <desrosj@git.wordpress.org>

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

@desrosj desrosj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This seems good, @priethor!

I was trying to think of any scenarios where the regex would unintentionally match something incorrectly. The only thing I could think of is if there were old, retired [Type] labels that are on a PR. Perhaps a new label is created to replace the previous one. But I don't think that's a blocker here. We can figure that out if it actually comes up.

@priethor
priethor merged commit 09d92d5 into trunk Oct 29, 2025
51 of 52 checks passed
@priethor
priethor deleted the update/label-enforcer-regex branch October 29, 2025 17:09
@github-actions github-actions Bot added this to the Gutenberg 22.1 milestone Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GitHub Actions Pull requests that update GitHub Actions code [Type] Project Management Meta-issues related to project management of Gutenberg

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants