Repository navigation
PR enforcer workflow: use regex to filter labels starting with [Type] - #72672
Conversation
Updated label requirements for PRs to require any label starting with '[Type]'.
|
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. |
desrosj
left a comment
There was a problem hiding this comment.
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.
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.