DEV Community

Discussion on: The Github Contribution Stats

Collapse
 
benwtrent profile image
Benjamin Trent

It's disappointing to see that only commits are taken into account.

PR reviews and creating issues are vital contributions to projects.

I wouldn't know how to weigh them all together though.

Collapse
 
hamzaanis profile image
Info Comment hidden by post author - thread only visible in this permalink
Hamza Anis

For the badge which includes PR and issues like this

alt

You can do something like this.

<img src=https://github-readme-stats.vercel.app/api?username={username}&show_icons=true alt={username} />
Collapse
 
anuraghazra profile image
Anurag Hazra • Edited

This one is my project, github-readme-stats btw :)

GitHub logo anuraghazra / github-readme-stats

Dynamically generated stats for your github readmes

Github Readme Stats

GitHub Readme Stats

Get dynamically generated GitHub stats on your readmes!

Tests Passing Issues GitHub pull requests

View Demo · Report Bug · Request Feature

简体中文 · Español

Loved the project? Please consider donating to help it improve!

Features

GitHub Stats Card

Copy paste this into your markdown content, and that's it. Simple!

Change the ?username= value to your GitHub's username.

[![Anurag's github stats](https://github-readme-stats.vercel.app/api?username=anuraghazra)](https://github.com/anuraghazra/github-readme-stats)

Note: Ranks are calculated based on user's stats, see src/calculateRank.js

Hiding individual stats

To hide any specific stats, you can pass a query parameter ?hide= with an array of items you wanna hide.

Options: &hide=["stars","commits","prs","issues","contribs"]

![Anurag's github stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&hide=["contribs","prs"])

Showing icons

To enable icons, you can pass show_icons=true in the query param, like so:

![Anurag's github stats](https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true)

Themes

With inbuilt themes you can customize the look of the card…




People don't usually know the origin because lot of people do not attribute the project.

Collapse
 
lorddashme profile image
Dash Reyes • Edited

Hello! thanks for the comment, really appreciated 😊. Actually yes, right now commits are only counted for the ratings and the other 3 vitals for contribution are not yet included (Issues, Code Review, Pull Requests). But yes I will include all of them now 😊

Collapse
 
benwtrent profile image
Benjamin Trent

I am glad the score exists :). It would be an interesting statistical analysis on how to weight each of them differently.

Thread Thread
 
lorddashme profile image
Dash Reyes

Here's the interesting part if we just use the following common statistic formula (I also explained it here in another comment: dev.to/lorddashme/comment/129i9) then we can get the ratings for the 4 vital metrics for the contribution (Commits, Code Review, PR, Issues) and give each metrics a ratings multiplier for example for the Commits it's pretty common so I will give it a 0.8 and then the Code Review with a 2 so this mean the Code Review is much higher weight compare to Commits 😄

Some comments have been hidden by the post's author - find out more