Using gitqlite
, query for percentage of commit count by author (in this case in facebook/react
). Limit to top 25, include a "chart"
Last active
July 7, 2020 02:17
-
-
Save patrickdevivo/5a03adfaff135a5bd8e7131b8cde1d78 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH total_commits(total) AS ( | |
SELECT count(*) AS total FROM commits | |
) | |
SELECT | |
author_name, | |
round(count(*)*100.0 / (SELECT total FROM total_commits), 2) AS percentage, | |
printf('%.' || (CAST (round(count(*)*100.0 / (SELECT total FROM total_commits)) AS INT) + 1) || 'c', '*') AS commits | |
FROM commits GROUP BY author_name | |
ORDER BY percentage DESC | |
LIMIT 25 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat query.sql | gitqlite --repo https://github.com/facebook/react | |
+---------------------+------------+----------------+ | |
| AUTHOR NAME | PERCENTAGE | COMMITS | | |
+---------------------+------------+----------------+ | |
| Paul O’Shannessy | 13.04 | ************** | | |
| Dan Abramov | 10.7 | ************ | | |
| Brian Vaughn | 10.41 | *********** | | |
| Ben Alpert | 9.06 | ********** | | |
| Andrew Clark | 5.72 | ******* | | |
| Sebastian Markbåge | 3.51 | ***** | | |
| Jim | 3.25 | **** | | |
| Dominic Gannaway | 3.06 | **** | | |
| Sebastian Markbage | 2.78 | **** | | |
| Cheng Lou | 1.66 | *** | | |
| Pete Hunt | 1.42 | ** | | |
| Christopher Chedeau | 1.24 | ** | | |
| petehunt | 1.06 | ** | | |
| Ben Newman | 1.05 | ** | | |
| Thomas Aylott | 0.86 | ** | | |
| CommitSyncScript | 0.73 | ** | | |
| Nicolas Gallagher | 0.69 | ** | | |
| Nathan Hunzaker | 0.64 | ** | | |
| Brandon Dail | 0.58 | ** | | |
| Andreas Svensson | 0.53 | ** | | |
| Flarnie Marchan | 0.51 | ** | | |
| Toru Kobayashi | 0.47 | * | | |
| Sophie Alpert | 0.45 | * | | |
| Dan | 0.41 | * | | |
| Timothy Yung | 0.37 | * | | |
+---------------------+------------+----------------+ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment