Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Improve article attribution heuristic #380

Closed
wants to merge 1 commit into from

3 participants

@jugglinmike

Make the attribution algorithm trace through the history
across file rename operations, but do not consider such operations as an
indication of contribution.

The compiled output is a single line of JSON, making it a bit tough to inspect.
Here's what I did to try it out:

$ git checkout -b tmp master
$ grunt
$ git add -f dist
$ git commit -m "Current build"
$ git pull git@github.com:jugglinmike/learn.jquery.com.git follow-moves
$ grunt
$ git diff --word-diff --word-diff-regex="[^,\{]"

Basically, it adds contributors who created/edited articles prior to 0fb17c3 (including yours truly) and removes contributors whose only interaction with an article was to move it (i.e. @rdworth in 0711375 and 7b49f82).

@jugglinmike jugglinmike Improve article attribution heuristic
Make the attribution algorithm trace through the history
across file rename operations, but do not consider such operations as an
indication of contribution.
58e60d1
@ajpiano
Collaborator

This is awesome, @jugglinmike. I'll give it a try but this solves a real problem that I didn't think we had a solution for! Have you signed the CLA? If not, now's a good time!

@rdworth

Thank you @jugglinmike . This has been bothering me for a while, so I'm happy to have a solution in sight

@jugglinmike

I have indeed signed the CLA. Don't you guys remember my monumental contribution to jQuery core?

@ajpiano ajpiano closed this pull request from a commit
@jugglinmike jugglinmike Improve article attribution heuristic. Fixes #380.
Make the attribution algorithm trace through the history
across file rename operations, but do not consider such operations as an
indication of contribution.
23791d3
@ajpiano ajpiano closed this in 23791d3
@arthurvr arthurvr referenced this pull request from a commit in arthurvr/learn.jquery.com
@jugglinmike jugglinmike Improve article attribution heuristic. Fixes #380.
Make the attribution algorithm trace through the history
across file rename operations, but do not consider such operations as an
indication of contribution.
f5f934c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 6, 2013
  1. @jugglinmike

    Improve article attribution heuristic

    jugglinmike authored
    Make the attribution algorithm trace through the history
    across file rename operations, but do not consider such operations as an
    indication of contribution.
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 1 deletion.
  1. +7 −1 grunt.js
View
8 grunt.js
@@ -93,7 +93,13 @@ grunt.registerHelper( "contributor-attribution", function( post, fileName, fn )
// Read contributors from git file information
grunt.utils.spawn({
cmd: "git",
- args: [ "log", "--format=%aN <%aE>", fileName ]
+ args: [
+ "log",
+ "--follow", // Trace history through file rename operations
+ "--diff-filter=AM", // Only consider "Add" and "Modify" operations
+ "--format=%aN <%aE>",
+ fileName
+ ]
}, function( err, result ) {
if ( err ) {
grunt.verbose.error();
Something went wrong with that request. Please try again.