Created
May 21, 2019 22:47
-
-
Save binford2k/b056e139bd57ebf2fdbce0b5c8a3e293 to your computer and use it in GitHub Desktop.
Most active Vox Pupuli members
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
/* GitHub query to get the number of comments, PR, releases, etc. for Vox Pupuli */ | |
/* Thanks to https://github.com/KrauseFx/krausefx.com/blob/master/_posts/2017-08-06-analyzing-your-public-github-contributions-using-google-big-query.md */ | |
WITH | |
ProjectData AS (SELECT * FROM `githubarchive.day.2019*` WHERE repo.name LIKE 'voxpupuli/%'), | |
Actors AS (SELECT DISTINCT(actor.login) AS login FROM ProjectData) | |
SELECT * FROM ( | |
SELECT | |
actors.login, | |
(SELECT COUNT(*) FROM ProjectData WHERE type = 'IssueCommentEvent' AND actor.login = actors.login) AS Comments, | |
(SELECT COUNT(*) FROM ProjectData WHERE type = 'PullRequestEvent' AND actor.login = actors.login) AS PRs, | |
(SELECT COUNT(*) FROM ProjectData WHERE type = 'PullRequestReviewCommentEvent' AND actor.login = actors.login) AS ReviewComments, | |
(SELECT COUNT(*) FROM ProjectData WHERE type = 'ReleaseEvent' AND actor.login = actors.login) AS Releases, | |
(SELECT COUNT(*) FROM ProjectData WHERE type = 'IssuesEvent' AND actor.login = actors.login) AS ClosedRenamedAndLabeledIssues | |
FROM Actors as actors | |
) | |
WHERE PRs > 0 OR Comments > 0 | |
ORDER BY PRs DESC, Comments DESC | |
LIMIT 100 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment