- Issue created by @longwave
- πͺπΈSpain fjgarlin
We are processing contributors as we find them in the "comments" property of the json representation of the issue ( https://www.drupal.org/api-d7/node/987238.json?drupalorg_extra_credit=1 β ).
Then we assign them to an array using the "username" as keys: https://git.drupalcode.org/project/contribution_records/-/blob/1.0.x/src...
But there is no ordering.
I will try to explore a sorting option based on the contextual activity that is being pulled via ajax.
- πͺπΈSpain fjgarlin
Note that the order in d.o seems to be: number of patches, then number of files, then number of comments.
Given that patches and files should not really be _that_ important, I think the order should just be based on the activity volume. In this case, it could be: patches + files + comments, and then have a unique order.
d.o issues are going to go away so we can't do anything specific to them, it has to be as generic as possible.
- πͺπΈSpain fjgarlin
Using the MR and the logic described above, we'd get this instead:
I think this is meaningful and simple enough,.
- πͺπΈSpain fjgarlin
This is ready to review.
This is only available for maintainers, and they can choose to save the order.
Attached is a video with a voiceover about what's going on.
-
fjgarlin β
committed 912bbd79 on 1.0.x
Issue #3538609 by fjgarlin: Improve sort order of contributors
-
fjgarlin β
committed 912bbd79 on 1.0.x
- πͺπΈSpain fjgarlin
Merged. Hopefully this is good enough and the sorting is meaningful enough.
We can iterate through this in a follow up if needed.
- πͺπΈSpain fjgarlin
@drumm's idea on weighting:
We might want to do some weighting, multiply comments by 100, commits/files by 10000 or something like that. Effectively making it primary/secondary/tertiary sorts with only one comparison underneath
Iβll do:
files x 100 + comments x 10 + reactions x 1
-
fjgarlin β
committed 0e1c96b4 on 1.0.x
#3538609 Change formula to sort rows.
-
fjgarlin β
committed 0e1c96b4 on 1.0.x