Skip to content

Instantly share code, notes, and snippets.

@pborreli
Last active December 19, 2015 09:29
Show Gist options
  • Save pborreli/5933880 to your computer and use it in GitHub Desktop.
Save pborreli/5933880 to your computer and use it in GitHub Desktop.
How to retrieve your GitHub Pull Request count using Google bigquery

Go to Google bigquery and execute the following query replacing XXX with your GitHub login

SELECT
COUNT(payload_pull_request_number)
FROM [githubarchive:github.timeline]
WHERE payload_pull_request_head_repo_owner_login = "XXX"
AND payload_action="opened";

To have a top XX of users by their Pull Request count execute this query

SELECT
actor, count(actor) as pr_number
FROM [githubarchive:github.timeline]
WHERE type='PullRequestEvent'
AND payload_action="opened"
GROUP BY actor
ORDER BY pr_number DESC
LIMIT 125;
actor pr_number
travis4all 11128
galthaus 2649
node-migrator-bot 2318
hhuijser 2058
juliocamarero 1913
msabramo 1214
dumganhar 1143
sergiogonzalez 1096
JMSBot 1085
natecavanaugh 1072
VictorLowther 1041
9rnsr 1020
bodepd 1010
jrogelstad 967
cloudedge 966
galstrom21 962
seanpaultaylor 961
TigerStripes 957
shuyangzhou 948
michaelhashimoto 891
pedroigor 884
darkwing 868
dbetebenner 851
lukecampbell 851
sylus 845
rackerjoe 845
2bits 844
christianv 839
dorkster 829
pelegri 815
shinnlok 760
johnnyhowey 759
Maks3w 756
pjackson28 742
NSV 741
portertech 734
matethurzo 733
mjschranz 720
zberentey 715
minrk 712
rotty3000 710
sbesson 706
glogiotatidis 697
juanferrub 687
shane-tomlinson 680
secretrobotron 675
andrewjpage 672
vishalduggal 667
boegel 663
mancdaz 648
diegosarmentero 646
timdream 642
ealonso 639
Gravatronics 635
bryan-m-hughes 634
xeno-by 634
romainneutron 633
abhinavc 633
harlowja 629
Florin65 626
igorw 625
dotjorgeu 625
Diapolo 620
xillibit 618
epgarcia 618
nickboldt 614
avoidwork 614
yurydelendik 603
rhelmer 594
parndt 593
unknownbrackets 593
Y0ba 589
minggo 586
shackbarth 586
willkg 586
whimboo 582
scrawl 582
zacc 574
rlr 573
julceslauhub 573
ogail 572
FranciscoBorges 572
andrerod 570
aabes 569
davidflanagan 568
pombredanne 563
ScottDowne 563
richardkchapman 556
tkf 555
cb1kenobi 554
s0undt3ch 553
eduardolundgren 548
garyrussell 544
clebertsuconic 538
eguaj 536
mahagr 536
vingtetun 534
fabi1cazenave 534
mikedm139 533
Eric-Brison 530
grosser 526
andrewgaul 526
paulp 525
ghalliday 523
nouiz 521
brianchiu 521
prolic 519
bebef1987 519
ipeychev 516
tricknotes 516
aledsage 511
etiennesegonzac 510
patriknw 505
pborreli 505
k88hudson 503
stof 503
bergerkiller 502
czue 500
cprice-puppet 499
mattdenner 499
marcoAntonioNina 498
migue 498
stenington 494
jhinkey 494
retronym 492
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment