Problem/Motivation
Commit credit only shows if the user (was the only person contributing and) was made the git author.
New contributors often wonder why they cannot see their commit credits after an issue they make a patch for gets committed.
It's not discoverable how to look up things.
http://tinyurl.com/drupalcores
https://public.tableau.com/profile/iameap#!/
git log | grep "My name"
git log | grep "My name" | wc -l
Are not obvious.
Since people do not see anything on their profile, but they have seen some commits on other people's profiles (from contrib project they are maintainers of, but they dont realize that), they think they they must have done something wrong, that their contribution was not credited.
Proposed resolution
server
Work is on http://usercommits-drupal.redesign.devdrupal.org
#2435119: I want a drupal.org development site for adding commit information to the user profiles
access username and password:
drupal
drupal
a user:
bacon
bacon
resolution
#2495441: Parse commit logs and store mentions as issue credit will be parsing the past commit mentions.
This issue is about displaying the information. (See #32)
Add commit credits, a list, or a count, or a link to see them, from user profiles.
The desired effect of adding this would be to capitalize on the excitement that a new patch contributor has,
and give them something they can send to their friends and say: hey look I did something.
Remaining tasks
- (done, enough to proceed) Discuss.
- Implement.
- comment #15
- See Drupal.org Develop on our server (preferred) instructions.
- See http://ericduran.github.io/drupalcores/
User interface changes
No. Well, a display, we should get a before and after screenshot when it's possible.
API changes
No.
Comments
Comment #1
xjmThis is an important feature. A Drupalist's d.o profile is essentially his or her résumé. Additionally, many contributors, especially new contributors, find the absence of core contribution on their profiles disappointing or even upsetting.
Comment #2
Dave ReidI like the idea behind this, but I think this needs to be moved to the infrastructure issue queue? Because I think we need custom code to parse the commit logs and display it, or alter it into the project commit info. There's nothing about this the webmaster team can really do here aside from 'approve' it?
Comment #3
colanIf there's one major author, how about simply using the author option in Git (and doing the above for additional authors)? For example, I was the only one who worked on #2055019: Syslog configure link missing on Extend/Modules page and I even provided Git metadata with git format-patch, but neither "git am" nor the "--author" option was used. Is there a particular reason why core committers aren't doing this? I'm a little bit confused because we do this sort of thing in contrib all the time.
It would help user cred on Ohloh, which builds each user's experience based on the number of commits authored. With the approach described here initially, core commits wouldn't count for anything over there.
Comment #4
YesCT CreditAttribution: YesCT commentedI do not think we can decide to redo how we credit in this issue.
Here we just want to parse our current system, and report it on the profile.
There may already be an issue open discussing the pros and cons of commit mentions (in the message) vs using the author ... or other git native things. Let us link to it if someone can find an issue like that.
Comment #5
dwwThere have been many discussions about proper Git attribution in core. For example:
#1717676: Core commit credit and log messages are inconsistent between patches and merges
https://groups.drupal.org/node/161659
...
Sadly, it's totally inconsistent. When people work on core via sandboxes, they do proper commits themselves. When those commits get merged into the real core, some people get actual commits in core. Everyone else who works via patches do not. The differences are the heart of what #1717676 is trying to resolve.
Meanwhile, parsing the commits for the old-school "[#x] by foo, bar" and crediting users foo and bar for that commit is sort of a pain. We'd probably want to put the code in drupalorg_versioncontrol so perhaps this issue should be moved to "Drupal.org customizations". But, it gets lots more visibility in this queue, so we can leave it here for now until we decide if/how to handle this.
One fundamental problem is that Git itself only has the notion of a single author for each commit. So I suspect that the Version Control API data structures we're dealing with (to generate the commit listings on profile pages) aren't going to be able to handle the case where a single commit is "authored" by multiple contributors.
If we don't basically lie to VCAPI about the commits, and handle this in a totally separate data structure and display it separately, that seems crappy, too, and will throw off the counts in the "native" commit listings...
Input from the Version Control API maintainers (e.g. sdboyer, marvil07, et al) would be most welcome.
Cheers,
-Derek
Comment #6
kgoel CreditAttribution: kgoel commentedAs a new contributor to core just like others, I would also like to see core mentions on my profile page. I agree here with @xjm that d.o. profile is drupalist's resume and without any contribution to contrib module and/or theme, profile page looks pretty empty.
I have added my input here - https://groups.drupal.org/node/313108 for significant improvement for Drupal.org after I saw the announcement here - https://association.drupal.org/node/18358.
Comment #7
YesCT CreditAttribution: YesCT commentedMoving the queue to go with this implementation...
uh, I suppose this needs to wait for 7.x?
Comment #8
YesCT CreditAttribution: YesCT commentedwho are the short list of people that would know how to implement this?
Comment #9
Anonymous (not verified) CreditAttribution: Anonymous commentedI've got a little script that I run to try to parse out the values for my personal scoreboard. Would it be of any use?
https://gist.github.com/JoshuaRogers/6632481
Comment #10
Dave ReidI'd also like to point out Eric Duran's project:
https://github.com/ericduran/drupalcores
http://ericduran.github.io/drupalcores/
http://ericduran.github.io/drupalcores/data.json
Comment #10.0
Dave Reidmake it a link
Comment #10.1
YesCT CreditAttribution: YesCT commentedfound related issue
Comment #10.2
YesCT CreditAttribution: YesCT commentedadded related about a profile field to drupalcores
Comment #11
klonos...we now have a dedicated place to put related issues ;)
Comment #12
mgiffordThis would fit nicely with other issues related to finding what motivates d.o users to contribute.
It could fit nicely into the open badges issues which are being discussed.
Comment #13
mgiffordThis is a big issue. I do think it would be useful though. Right now there is little, no recognition for contributing. It can be a good motivator.
Comment #14
RainbowArrayGiven the work to clean up Drupal profiles in #2281763: Make Drupal.org user profiles more robust, I think it's even more important to find a solution for this.
As Cathy asked above, who has the power or abilities to make something like this happen? Clearly it's possible given the existence of Eric Duran's Drupal Cores site. Would it be possible to repurpose some of that code to make this work?
Comment #15
drummThis can be a lot more straightforward on Drupal.org. The commit messages are available locally in the versioncontrol_* tables, and can be parsed as they happen too. What we would want from Eric Duran's work is the actual parsing algorithm; for example, making sure "Dave Reid" is parsed correctly with the space.
That parsing is still intensive, it can't be done on profile view. We will probably want to store the data in a table like (commit, user), one row for each mention. Probably something along the lines of the code that finds issue node IDs in commit messages, http://cgit.drupalcode.org/versioncontrol_project/tree/versioncontrol_pr... and http://cgit.drupalcode.org/versioncontrol_project/tree/versioncontrol_pr...
This should all be doable on a dev site, https://www.drupal.org/node/1018084, if someone wants to work on this.
Comment #16
ericduran CreditAttribution: ericduran commentedThis should be pretty simple to re-implement on drupal.org
I haven't worked on drupal.org specific code in a while so I'll need to get another dev d.o up and running but besides that it shouldn't take much work.
The parsing is mostly 20 lines the one tricky thing we do is we keep a local mapping for when people change usernames. That could just be moved to being handle on a case by case basis based on the infra-queue.
That being said @drumm is right, we do not what to do this on view (that would be really bad).
We we'll need to keep the data in a separate table but that also should be pretty straight forward. We can do the initial import based on a drush script or an update (queues) hook but I'll pretty much go with a drush script so we can able to re-built it if anything. This will only be needed for the initial import after that we could just use the version_control_api hooks to parse the commits as they come in and give proper attributions.
In short i'm ok contributing this feature, or someone else can work on it, if they beat me to it.
Comment #17
YesCT CreditAttribution: YesCT commentedadding link to summary for how to get a copy of d.o to work with
Comment #18
YesCT CreditAttribution: YesCT commentedComment #19
YesCT CreditAttribution: YesCT commentedComment #20
YesCT CreditAttribution: YesCT commentedComment #21
YesCT CreditAttribution: YesCT commentedComment #22
YesCT CreditAttribution: YesCT commentedthis issue, and some related ones were submitted to GSOC https://groups.drupal.org/node/455978#project35
Comment #23
drummIs this a good match for GSOC? With #2369159: Extend crediting UI to include organizations & customers this should be a few hours designing and building a View. My understanding is that it would be too small for an all-summer project.
Comment #24
YesCT CreditAttribution: YesCT commentedThey are students and have to learn a bunch about Drupal and d.o and test writing in order to do the task. Also... our conversations about approaches and UIs and performance can take weeks, not hours (especially for a student learning about those topics). AND, we still have to parse the commit mentions from before that issue went in, so we now have two ways of gathering the data, and then need to combine the results. I agree though, that this one issue *might* not have filled a student's summer, which is why the proposal this issue was part of (that was linked) included more things.
ps. I don't think this was was selected anyway :(
Comment #25
lauriiiJust wanted to mention that there is also json data available of the commit mentions for people http://drupalcores.com/data.json . With a small change it would be possible to provide this data also before a specific date if wanted so.
Comment #26
YesCT CreditAttribution: YesCT commentedadding https://public.tableau.com/profile/iameap#!/ (from @iamEAP) to the list of ways people look at core commit mentions
Comment #27
YesCT CreditAttribution: YesCT commentedComment #28
webchickJust checking to see if there's any kind of ETA on exposing the commit credit data? I know the intent was to hold off until we have a bit more data captured. Do we feel like we're nearing that point?
Comment #29
webchickAlso, to keep things simpler, I would highly recommend in this issue we only get the plain credit count on the org/user profiles in some fashion. And explore aggregate visualizations like drupalcores.com etc. elsewhere, since that's a much broader topic and can have community implications. (e.g. leaderboard of individuals vs. leaderboard of companies, large companies vs. small companies, etc.)
Comment #30
drummThis is ready to work on, when someone has time. I made sure it is in our staff backlog.
To further simplify this, I broke out backfilling old data into a separate issue, #2495441: Parse commit logs and store mentions as issue credit. Do we want to launch this issue only after old data is backfilled, or go ahead and mention that credit is generally only there for issues updated after [don't know the day offhand] 2015?
Comment #31
marvil07 CreditAttribution: marvil07 as a volunteer commentedI have been maintaining scripts to do this for a long time, but it is based on a drupal core git repository. The last time I rewrote them I used php.
In this case that git extraction will not really be needed since we have the commits in the database, but I would say we want to do the same process, that is, creating an sqlite database with the data (let's not fill more d.o db), so we can analyze it later from several angles, instead of trying to parse every time. Notice that those scripts take in account a way to "fix wrong messages", e.g. typos, by providing a way to override the messages.
I would be glad to help/collaborate with someone to do this.
Comment #32
drummLet's track the parsing in #2495441: Parse commit logs and store mentions as issue credit. Sticking to MySQL, maybe temporary tables, is encouraged. The DB servers have plenty of power and do not need additional setup.
Comment #33
webchickSpoke to Dries about this question, and his proposal was slightly different, so moved to a separate issue: #2498497: Expose recent issue credits data on user & organization profiles
In short, because the credit UI is actually tracking new data (issues someone contributed to closing), there's no reason to block exposing it on profiles based on the parsing/storage of historical data. And tracking only the past ~3 months of data is arguably better anyway, as it incentivizes organizations to keep their employees' participation active and ongoing.
Comment #34
webchickAdjusting the issue title for clarity, since I got confused in #28 thinking this was about issue credit data.
Comment #35
YesCT CreditAttribution: YesCT commentedThe thing that appears different about #2498497: Expose recent issue credits data on user & organization profiles is that it includes also organization pages. Otherwise, I think that is this issue because of #32.
And, this issue is not just about core...
and if #2495441: Parse commit logs and store mentions as issue credit will be parsing the past commit mentions, then ... this becomes about displaying the information.
Comment #36
webchickNo, what we track in the DB is different than commit credit; we actually track issue credit. And only for closed issues, from what I understand. That issue credit UI is also used to generate default commit messages, but commit messages can include other people not present in the issue, and also can (and do) exist without any d.o issue at all. So these really are separate concerns, I think.
And right, I forgot that contrib sometimes uses the "Issue #3434 by foo, bar" commit message format instead of --author. Trying to figure out a way to make this clear from the issue title. Let's try this.
Comment #37
drummSee #32 and #2495441: Parse commit logs and store mentions as issue credit. This issue is not about parsing.
Comment #38
webchickPer IRC, re-titling to be a bit more clear what we mean here vs. #2498497: Expose recent issue credits data on user & organization profiles.
Comment #39
YesCT CreditAttribution: YesCT commentedThat issue went in. So I think we should come back to this now.
Comment #40
tim.plunkettUntil this issue is fixed, I think pages like https://www.drupal.org/u/tim.plunkett/issue-credits/3060 should be appended to say "in the last 3 months".
Comment #41
YesCT CreditAttribution: YesCT commented@tim.plunkett yeah, I mentioned that in #2498497-15: Expose recent issue credits data on user & organization profiles
Comment #42
drumm#2495441: Parse commit logs and store mentions as issue credit is the blocker for this issue.
https://www.drupal.org/u/tim.plunkett/issue-credits/3060 actually does have the whole history that we have in the database, starting when the Credit & Committing fieldset was expanded to store credit.
Comment #43
webchickYes, I think the idea is "Denote that this list is only since XXX date" rather than making it appear as though the #2 contributor to core has only ever fixed 32 core issues. ;)
Comment #44
YesCT CreditAttribution: YesCT commented@tim.plunkett @webchick for #40 and #43:
#2522070: Give better context for list of issues credited on d.o
Comment #45
YesCT CreditAttribution: YesCT commentedsome contribution credit issues have d.o profile improvements tag, and some have nothing and are easy to get lost (and not about profiles), so tagging to organize credit ones.
Comment #46
drummAll recorded credit is now accessible from user profile pages. Once #2495441: Parse commit logs and store mentions as issue credit is done, this issue will be done too.