WordPress.org

Making WordPress.org

Opened 4 months ago

Last modified 2 weeks ago

#4447 new enhancement

Create an easier way to trac contributions across GitHub and Trac

Reported by: desrosj Owned by:
Milestone: Priority: normal
Component: Profiles Keywords:
Cc:

Description

A way to Trac contributions across both Trac and GitHub does not yet exist. This makes it difficult to properly compile a list of contributors on release days, and often leads to people accidentally left out or not receiving the proper level of credit.

Compiling the list also requires some work of manually matching WordPress.org and GitHub usernames.

Previously #3885, #4442.

Some ideas have been:

  • Add a field to profiles.w.org for GitHub account.
  • Create a text file that maps GitHub usernames to .org accounts that can be updated every release and can be used to script this.

Attachments (2)

back-end.png (62.0 KB) - added by melchoyce 4 months ago.
front-end.png (54.5 KB) - added by melchoyce 4 months ago.

Download all attachments as: .zip

Change History (17)

This ticket was mentioned in Slack in #core-committers by desrosj. View the logs.


4 months ago

#3 @earnjam
4 months ago

Have their been any thoughts to using props on GitHub? That would allow people who do testing of pull requests, or provide design input, but aren't necessarily the original person who opened the PR, to still get credited as a contributor to a release.

It would require some sort of script to parse commit messages similar to what we do with svn now. We also would still need a way to map it back to wp.org usernames.

#4 follow-up: @aduth
4 months ago

Additional ideas:

  • An email address is available for any git commit, and could be associated to an equivalent user profile on WordPress.org (example, see commit.author.email)
  • GitHub uses Gravatar as a fallback for user profile images. It could be possible to associate a user by lookup of equivalent Gravatar URL on WordPress.org.
    • From initial observation, GitHub appears to use its githubusercontent.com domain as a proxy to profile pictures, so it may not be possible to retrieve directly their Gravatar URL.
  • As suggested in Slack by @youknowriad, we could automate a bot to leave a comment for new contributors prompting them to provide their WordPress.org account name
    • e.g. Directing the user to submit to a Google Forms
    • Similar to contributor license agreements (example)
    • Perhaps an opportunity for using GitHub actions recently made available in the WordPress GitHub organization

Have their been any thoughts to using props on GitHub? That would allow people who do testing of pull requests, or provide design input, but aren't necessarily the original person who opened the PR, to still get credited as a contributor to a release.

The workflow wouldn't be too difficult to adopt. For example, merging a pull request provides the opportunity to revise the commit message, which could include a "props" message (https://cloudup.com/cxeB8bEAQ_j screenshot).

I'm not sure how it addresses the need of the ticket though, since presumably it would need to be specified as their WordPress.org username, which can difficult to determine.

There's also the human element to consider in the opportunity to be overlooked. It's true of SVN, though in that case there's much more thoughtful consideration to the crafting of a commit message than what typically occurs in a merge on GitHub.

The general idea would be good to consider, since credit should be attributed to more than just the author of a pull request. It may be worth considering if this "props" could be automated from GitHub's pull request reviews, which aren't strictly limited to code review.

A way to Trac contributions across both Trac and GitHub does not yet exist.

Mentioned in Slack as well, but there is a document which exists in the Gutenberg repository. However, it is not always reliable, since it requires both that a person knows it exists and that they feel comfortable enough to propose (by pull request) to be included. Therefore, it often lacks entries from irregular contributors.

https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTORS.md

@melchoyce
4 months ago

@melchoyce
4 months ago

#5 @melchoyce
4 months ago

back-end.png and front-end.png are a quick idea for adding a GitHub field to profiles.

(Pretend that github username on the front-end mockup is underlined)

Last edited 4 months ago by melchoyce (previous) (diff)

#6 @jorbin
4 months ago

1) I would love for the profile change. I think that would be helpful in general and not just in this context.

2) I have some #badcode that looks at all trac activity at any given time which could be modified to look only at tickets closed on a specific milestone and extended to also look at github activity. This could help ensure that if props are missed on a commit, people are also credited. The biggest hangup for combining them is definetly connecting GH username and wporg username.

Here is the #badcode https://github.com/aaronjorbin/wp-mac

#7 follow-up: @talldanwp
3 months ago

Github has a feature similar to props for co-authorship of a PR:
https://help.github.com/en/articles/creating-a-commit-with-multiple-authors

There are a couple of negative aspects to the co-author system:

  • It relies on knowing the email address of the co-author and using a very specific syntax.
  • When a PR is squashed to master, co-authors of commits on the branch are stripped out of the final commit message (seems like this is possibly an unhelpful bug on github). Co-authors would have to be specified manually, or using some kind of automation.

Positives:

  • The UI in github is quite nice (multiple avatars are displayed next to the commit).
  • Co-authorship is counted as a contribution in github's stats.
Last edited 3 months ago by talldanwp (previous) (diff)

#8 in reply to: ↑ 4 @azaozz
3 months ago

Linking the wp.org profile to the GH profile is best imho, thanks @iseulde (https://wordpress.slack.com/archives/C18723MQ8/p1557324802058000) and @melchoyce (https://meta.trac.wordpress.org/ticket/4447#comment:5).

Replying to aduth:

An email address is available for any git commit, and could be associated to an equivalent user profile on WordPress.org.

Right, but only if the wp.org and GH email addresses match. Seems that is not true in many cases. Best is to link the GH and wp.org profiles. That also "grants" user consent for linking from one place to the other.

GitHub uses Gravatar as a fallback for user profile images. It could be possible to associate a user by lookup of equivalent Gravatar URL on WordPress.org.

Thinking it would be better to not look at Gravatar hashes. Not very reliable and may bring some "user privacy" concerns.

As suggested in Slack by @youknowriad, we could automate a bot to leave a comment for new contributors prompting them to provide their WordPress.org account name

And/or to add their GH user name to their wp.org profile (when this becomes possible). Think this is a good idea.

#9 in reply to: ↑ 7 @azaozz
3 months ago

Replying to talldanwp:

There are a couple of negative aspects to the co-author system:

  • It relies on knowing the email address of the co-author and using a very specific syntax.
  • When a PR is squashed to master, co-authors of commits on the branch are stripped out of the final commit message (seems like this is possibly an unhelpful bug on github). Co-authors would have to be specified manually, or using some kind of automation.

Would it be possible to "extract" all user names or emails of the co-authors before the PR is squashed (or branch is deleted) and post them in a ...special comment. Then can probably look for these comments and give everybody credit as deserved.

#10 follow-up: @desrosj
3 months ago

Are we concerned at all with verification of ownership? For example, nothing stops me from using @aduth's GitHub username on my .org profile.

Maybe there could be a verification step where an email is sent to the user's GitHub email for confirmation.

#11 @talldanwp
3 months ago

Would it be possible to "extract" all user names or emails of the co-authors before the PR is squashed (or branch is deleted) and post them in a ...special comment. Then can probably look for these comments and give everybody credit as deserved.

I'm not 100% sure what's possible with automation on github. If we did have a way to automate it, I also wonder if it'd be possible to 'extend' the co-author format to mention usernames as well. Currently it's:
Co-authored-by: name <name@example.com>

I wonder whether something like the following might still work in github, but also allow us to specify and scrape github and/or WordPress.org usernames as well:
Co-authored-by: name <name@example.com> (github:username, wp.org:username)

One downside of using a commit message is that once that commit is in master, it can't easily be changed.

Last edited 3 months ago by talldanwp (previous) (diff)

This ticket was mentioned in Slack in #meta by tellyworth. View the logs.


3 months ago

#13 in reply to: ↑ 10 @dd32
3 months ago

Replying to desrosj:

Are we concerned at all with verification of ownership? For example, nothing stops me from using @aduth's GitHub username on my .org profile.

Maybe there could be a verification step where an email is sent to the user's GitHub email for confirmation.

The "simple" solution for that is using something like "Link my Github account" instead of a plain-text field, we'd then do an OAuth flow to allow access for either user:email or [no scope] (allows access to public data only). That would then be able to provide an authenticated dd32 on WordPress is Github:dd32 scenario which can then populate that profile field.

This ticket was mentioned in Slack in #core-editor by talldanwp. View the logs.


8 weeks ago

#15 @dd32
2 weeks ago

  • Component changed from General to Profiles

Today I added a Link your github account section to profiles.wordpress.org, following @melchoyce's mockups above.

To link an account, which uses a GitHub application, simply go to your profile edit screen and go through the oAuth flow (It grants read-only access to your public information).
(edit: Just to add - Please suggest string changes if you feel it's needed)

The GitHub application remains Authorised on the GitHub account, just with next-to-no-permissions. Delinking the GitHub from your WordPress.org profile also removes the GitHub authorisation. Revoking access to the app from within GitHub also removes it from your WordPress.org profile.

It's been live for a few hours, and a handful of users have already used it seemingly without problem, so I'm now posting here.

Here's My profile https://profiles.wordpress.org/dd32/ as an example.

Remaining here, is still a way to link that into the props toolings, I'm not sure what the best option there is, but lets now focus on that part of this ticket.

We could also look into ingestion of GitHub Issues/Commits/PRs/etc into the profiles activity stream.

Last edited 2 weeks ago by dd32 (previous) (diff)
Note: See TracTickets for help on using tickets.