Making WordPress.org

Opened 20 months ago

Last modified 20 months ago

#6401 new enhancement

Add verification for the user names in the "Props" in commit messages

Reported by: azaozz's profile azaozz 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?).

Change History (1)

#1 @dd32
20 months ago

is that possible?

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 and timkersten655 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 in thijsoo.

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:

  • Parse message, if ^Props .+$ is present continue
  • If SKIP CHECKING NAMES is present, remove it from the message and stop processing, allow commit to continue.
  • Validate users match expected accounts
  • If validated: Proceed with commit.
  • If not: Abort commit with debug output specifying "$user in props list not found" for each affected user, link to commit message formatting guides, and "To ignore this warning, include 'SKIP CHECKING NAMES' in your commit message".
Note: See TracTickets for help on using tickets.