-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reformat the Props Bot comment #21
Conversation
This reformats the comment left by the bot in a few ways: - The SVN `Props:` style attribution line is now included as an option in the comment. - The headers for the `Co-Authored-By` style comment are removed. - The Unlinked Contributors are now listed before the `Co-Authored-By` ones. - There is significantly more context in the comment around what's going on, how to appropriately use the information in the comment, or learn more. - Unlinked contributors are now pinged as part of the comment with a request to connect their accounts.
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 Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @desrosj-bot. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. Core SVNIf you're a Core Committer, use this list when committing to
GitHub Merge commitsIf 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 core handbook. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a test review.
This is a comment from an account that is not linked to a WordPress.org profile. |
It's not clear if this is necessary or will results in missed props currently.
I'm pretty happy with where this is at. Tagging @aaronjorbin and @jeffpaul for a review since they both provided feedback to the message contents and phrasing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor text/link update but not a blocker for merge, THIS IS AWESOME THANK YOU FOR LEADING THIS!!!
I agree with Jeff Paul. Minor suggestions above, but I'm 👍 as a whole. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor suggestion but mainly testing the bot.
return; | ||
} | ||
|
||
return `Co-Authored-By: ${username} <${dotOrg}@git.wordpress.org>`; | ||
return contributorLists['coAuthored'].push( `Co-Authored-By: ${username} <${dotOrg}@git.wordpress.org>` ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to obtain the GitHub no-reply email addresses via the WP API you're using, ie in the format [email protected]
? This will allow co-authored commits to show up without people needing to associate it with their account. As an example, mine is [email protected]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can, but because our ultimate goal is to give credit in the Credits API, I chose to use the [email protected]
format. I also didn't love the idea of hard coding personal emails in the commit messages if someone has that setting turned off. I don't recall if the anonymous format worked even if you had that disabled. I could test if there's a strong preference to use that format instead.
The other thought I had was for consistency with how committers are attributed credit from the WordPress/wordpress-develop mirror. When a contributor is granted commit access, they are told to add the @git.wordpress.org
format to their account, as that's the email given to the commit author. A "pie in the sky" idea that I'll investigate once we get this initial round settled is to include Co-Authored-By
trailers for everyone that receives Props in an SVN commit. My thinking there is that the same format as the committer would make sense.
By including unlinked contributors in the commit message, though, we can easily extract their GH slug from the list and look in the .org database for any contributors that have connected their account since any of their contributions were merged.
There's some weirdness to detail around those emails as noted on that page:
If you created your account on GitHub.com after July 18, 2017, your noreply email address for GitHub is an ID number and your username in the form of [email protected]. If you created your account on GitHub.com prior to July 18, 2017, and enabled Keep my email address private prior to that date, your noreply email address from GitHub is [email protected].
In my research from a year or so ago, I couldn't find a way to figure out which format a specific user has. But in recent testing, I found that both formats worked, regardless of the format it tells you you have.
Another layer to that is on the Change your username page:
If you've been using a GitHub-provided private commit email address, whether or not your commit history will be retained after an account rename depends on the format of the email address. Git commits that are associated with your GitHub-provided noreply email address won't be attributed to your new username and won't appear in your contributions graph, unless your noreply email address is in the form of [email protected]. Older versions of the noreply email address that do not contain a numeric ID will not be associated with your GitHub account after changing your username.
So we'd always need to use the ID+USERNAME
format just in case someone changes their username. On the other hand, WP.org usernames cannot be changed.
Sorry for the brain dump, but this was a good chance to document some of my thinking/findings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the goal here is to improve the breadth of folks properly credited from GitHub repos back to WordPress core major releases and to streamline the major release credits gathering process, the approach that @desrosj has here makes sense. If the goal was to ensure all GitHub users were properly credited on PRs, then using the format @peterwilsoncc noted would likely be the best approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Been thinking about this the last few days.
I think I do prefer using all .org usernames, but it could be reasonable to use the GH format email for any contributor that's not linked to a .org one.
We can still parse out their GH user and look them up in the .org API, and they'd receive attribution on GH from their anonymous email. But that also removes some of the incentive to connect their account in the first place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@desrosj Does the WP.org integration add [email protected]
to a users profile when they link their accounts or is that a step the contributor would need to do to get recognition on GitHub?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, they will need to add it manually. I plan to include this in the announcement post, and the documentation. Based on this comment , though, it doesn't seem that our authentication request currently allows us to modify your profile at all. We'd need to add that to the request, and contributors with pre-existing connections would need to re-approve the connection with the new permissions.
I was talking this through with @dd32 last night. Wanted to document our discussion. At first he did not like using @git.wp.org
emails, but after some discussion, this was how he summarized his thoughts:
- On a GitHub-first repo, it makes sense to use @…github.com emails
- On a SVN repo, it makes sense to use username
- On a SVN -> Git sync, it makes sense to append Co-Authored-by: …@git.wordpress.org (But who knows if we wanna do that)
- On a SVN -> Git -> GitHub sync, We can’t modify the commit message of ^ so meh, i guess it makes sense to use @git.w.org
- Because of ^, it makes sense that on a GitHub-First repo, we could just use @git.w.org for consistency.
It's worth noting that in that list, there are currently no SVN -> Git syncs that do not make it over to GitHub.
Some other takeaways from our discussion:
- Even though we're heavily using GitHub at this point, there's always a non-0 chance that as a project we decide to use something other than GitHub (ie. GitLab). If this does happen, then the
ID+username@github
emails would be out of place. We could likely add a way for the tool to support these, but using wp.org ones would be somewhat tool-agnostic. - There's currently no ability to validate that you own the
@git.wp.org
email that represents you. Adding the ability to verify this through email will likely be appropriate to avoid any problems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've gone and created #28 for changing the unlinked contributor list to use GH emails. I think that makes sense, but figured it would be good to tackle separately.
Co-authored-by: Aaron Jorbin <[email protected]>
I'm going to merge this. I hope I'm reading it right, but based on your original comment @peterwilsoncc, I don't think any of that discussion is a blocker. If I'm wrong, please feel free to create an issue for anything that is unaddressed and we can continue discussing! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Evolving that sad, grey checkmark into a more powerful, capable green checkmark. Checkmark, I choose you!
|
||
commentMessage += contributorsList['coAuthored'].join("\n") + | ||
"\n```\n\n" + | ||
"**To understand the WordPress project's expectations around crediting contributors, please [review the core handbook](https://make.wordpress.org/core/handbook/).**\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added ticket #29 to replace this link, but it's not a blocker.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'm going to merge this. I hope I'm reading it right, but based on your original comment @peterwilsoncc, I don't think any of that discussion is a blocker.
No, not a blocker.
I have not gotten a chance to dive deeply into the implementation here, but I do really like this idea and think it will greatly improve the DX for people committing changes to any of our repos. I’m curious if there’s an ability to sync any related comments from a linked Trac ticket when this is used in the Core SVN repo, since most of the time it takes a bit of effort to read through a ticket to determine who to add to a props list along with anyone who contributed directly on the PR. No need to answer that question before merging this, just more for me to better understand the end goal here. |
Very excited to see this happening! I'm definitely in favour of using the Much as we did with Slack email verification so many years ago, setting up limited email forwarding for If it turns out that lots of people don't add their |
Yes, very much in favor of that. What's the best way for us to coordinate within the project to make that happen? |
There was a request put in earlier today for this on the Make Systems blog. |
@joemcgill Great idea! That shouldn't be too hard to implement. Each ticket has an RSS feed that we can pull in and process. I created #30 to track this! |
Thanks everyone for the great work and feedback! I'm going to merge this in the interest of keeping things moving. We can follow up in the spin-off issues that have been created. |
"Contributors, please [read how to link your accounts](https://make.wordpress.org/core/2020/03/19/associating-github-accounts-with-wordpress-org-profiles/) to ensure your work is properly credited in WordPress releases.\n\n"; | ||
} | ||
|
||
commentMessage += "## Core SVN\n\n" + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@desrosj, would it be possible to make this configurable? While Core SVN
makes perfect sense in WordPress develop, the GitHub Merge
isn't that useful. Then, when contributing to Gutenberg, it exactly the other way around. So while the default could be as is, what if you could pass the setting when defining the GitHub workflow?
svnProps: true
gitCoAuthored: true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you make an issue for this on the @WordPress/props-bot-core repo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pleasure: #38 :)
What?
This reformats the comment left by the bot in a few ways:
Props:
style attribution line is now included as an option in the comment.Co-Authored-By
style comment are removed.Co-Authored-By
ones.Fixes #4, #8, #12, and #17.