-
-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Forward integration results in strange language metrics #12
Comments
Hi, @alaendle The core of this gist is fetch user commits from GitHub API and counts them. Lines 56 to 57 in 33e344b
Lines 79 to 80 in 33e344b
If I could judge where the commits were came from, I may be able to fix it. |
@inokawa Many thanks for your reply. I now understand how deep the rabbit hole goes. The basic problem from my point of view is that YES technically I integrate/push all the commits from MAIN during a FI (the C's on MAIN) - however usually this is never my code and I don't like to count this code to my stats.
However I have to admit that it isn't easy to distinguish the "right" commits from the "wrong" ones - simple there is no direct relationship between the GitHub user and the git user. So no solution would be perfect. The only thing that came to my mind is that some (maybe optional) filtering of the commits with regards to the git user name might solve these kind of misinterpretation. |
Looks nice. It may be possible to put a filter like this .filter((c) => c.author.name === 'foo')
.filter((c) => c.author.email === 'bar') to Lines 56 to 57 in 33e344b
https://docs.github.com/en/developers/webhooks-and-events/events/github-event-types#pushevent Recently I don't have time to work on this, but it's ok to fix your own gist and PRs are also welcomed. |
Hi @inokawa - many thanks for your kind support ❤️. I've just fixed my gist the way you suggested alaendle/lang-box@c10b934#diff-bfe9874d239014961b1ae4e89875a6155667db834a410aaaa2ebe3cf89820556 My rare last name is finally paying off 😉 However I see no real generic solution - so I haven't created any PR for now. btw, the famous https://github.com/bokub/github-stats-box suffers similar problems with regards to it's commit count. |
If changes are merged (into a PR) they got attributed to the author (of the merge commit) - e.g. I suspect that Azure/iotedge#6114 brings me a lot of Rust-lines, however I have never touched a single line in a rust file.
I Know I kept very short; please let me know if this isn't self explaining or if I could contribute further information.
The text was updated successfully, but these errors were encountered: