Opened 3 years ago
Last modified 3 years ago
#6401 new enhancement
Add verification for the user names in the "Props" in commit messages
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Version Control | Keywords: | |
Cc: |
Description
It's pretty bad/quite embarrassing when there are any errors in the props part of a commit message. This idea to reduce that risk came while chatting with @hellofromTonya: would it be possible to verify the WP.org user names that are added as props in commit messages? Can probably be (yet another) precommit script, perhaps.
Then if a prop doesn't match any user name, stop the commit and look into the GH to trac name conversion "list". If a match is found, suggest the change in the svn error message (is that possible?).
Note: See
TracTickets for help on using
tickets.
Anything is possible.
However, there's been plenty of times where a props list cannot be 100% WordPress.org usernames, such as when it's a Gutenberg "merge" and the GitHub users do not have a linked/known WordPress.org username, or where it's a PR merged from GitHub where unknown-WordPress.org users were commenting - https://core.trac.wordpress.org/changeset/53429 is an example of that, where
teunvgisteren
andtimkersten655
are GitHub usernames which we don't know their WordPress.org usernames for (if they even exist).This would require us to force/require the very specific
Props $user1[, $user_n]*.
format though, which would be a good thing, because the props parser (make.wordpress.org/core admin access required) often has issues parsing older commits where that format wasn't used.. although it usually is today.https://core.trac.wordpress.org/changeset/53395 is an example of where a username was typo'd, extra
o
inthijsoo
.https://core.trac.wordpress.org/changeset/48072 is an example of where a username was not known, and a full name was used instead (There's two of them in the props list).
(Sorry, not picking on any individual committer, these were just the first examples that came up)
I guess if this is something that's wanted, the process would be something like this:
^Props .+$
is present continueSKIP CHECKING NAMES
is present, remove it from the message and stop processing, allow commit to continue.