sindresorhus/refined-github

Include in hovercard the user's contributions commit count + order #4657

darkred posted onGitHub

Description

In a repo's: Insights | Contributions tab, there are listed all contributions to main, excluding merge commits and bot accounts. By default they are shorted by 'Commits' contributions count. In this repo the order is as follows:

<table> <tr> <td>1 <td>fregante <td>1,048 commits <tr> <td>2 <td>yakov116 <td>258 commits <tr> <td>3 <td>sindresorhus <td>195 commits <tr> <td>4 <td>cheap-glitch <td>96 commits <tr> <td>5 <td>kidonng <td>84 commits <tr> <td>(etc) <td> <td>

</table>

Currently hovering mouse over a username of a member that has commmited to the repo, there's info as follows:

Committed to this repository in the past day Committed to this repository in the past week Committed to this repository in the past month Committed to this repository

  My suggestion is to also include commit count + order (see mockup below). The reasoning is: the most active/top contributors to better stand out among the repo community.


Related info:

Screenshot

2021-08-11_210022 2021-08-11_210325

Example URL

Everywhere, specially in Issues and PRs


While not exactly the same, this extension is pretty good at it https://github.com/hzoo/contributors-on-github

posted by fregante over 3 years ago

That extension is super useful to have, thanks for the suggestion!

That extension only applies to the 1st post (OP/author) of issues and PRs, and it only lists 'issue' and 'PR' count (repo/org/globally). Regarding the OP's contributions to the repo, it only lists their PRs count - not 'commits' count. But, authoring a PR are not the only way to make commits - you can co-author a PR, and you can directly commits to main branch.

I believe that using commits count as a "metric" is useful, as it includes any commits made from PRs. The main thing I have in mind with my suggestion is, wherever you may be having a conversation at github (be it a new issue/PR, or commenting in a very long thread), to be able to quickly view the contributions of any participant.

posted by darkred over 3 years ago

I love this idea. GitHub actually has some sort of this feature, but only for the new and (relatively) less frequently used Discussions (example from https://github.com/sindresorhus/got/discussions/1791):

<img width="358" alt="Screen Shot 2021-08-13 at 19 35 07" src="https://user-images.githubusercontent.com/44045911/129351591-b8666920-df93-4566-9f73-bcaaabb98ce2.png">

We can add a new item to the list, displaying something like "Authored 1 commit, opened 2 issues, merged 3 pull requests".

posted by kidonng over 3 years ago

I'm glad you like my idea. Don't you think that having the order would also be useful? In the repo you linked it would actually be '#​2' (see), i.e. : "Authored 345 commits (#​2), opened 45 issues, merged 22 pull requests"

posted by darkred over 3 years ago
posted by fregante over 3 years ago

It's your decision of course, but I just wanted to tell you that I had prepared a PR (based on the 'Contributors on Github' extension) with a new feature that works what I described. I believe that with some guidance from you, it could be made complete (I was waiting for the summer feature freeze to end) : 12345~

posted by darkred over 3 years ago

Feel free to open a PR to demo it and store its code here forever, and then we can decide depending on how big it is 😃 (probably still not though)

posted by fregante over 3 years ago

Fund this Issue

$0.00
Funded

Pull requests