marktraceur at riseup
Jul 5, 2012, 8:10 PM
Post #7 of 7
> (Also, this isn't counting people who contribute to the mobile projects
Re: request for Git statistics (or, "don't stand back, I don't know regular expressions")
[In reply to]
> on GitHub, and really the final monthly report stat ought to. I don't
> quickly see a way to ask "how many unique contributors submitted unique
> pull requests to a https://github.com/wikimedia/ repo in June?" on
> GitHub, though, so I'll put that off till next month.)
I was bored, so I made you a Python script this time :)
It's attached, it takes a year and month as its arguments, and fetches
all the repos at github/wikimedia, then fetches their pull requests, and
then finally checks to see which pull requests match the month you
specified. Something like
$ ./githubunique 2012 06 # should give "3 unique contributors"
And yes, most months only have very few contributors, but anything we
can do to increase the count :)
> It also doesn't count people who are making operations changes, or
> Wikimedia site configuration changes, or are packaging debs, etc, etc.
> It would be awesome to see stats for those as well. I have a feeling
> that we have more contributors then the record ;).
This should be as simple as removing the "project:^mediawiki.*" bit from
the previous bash script. I'm not sure if there are other bots to
exclude in that case, though, so I'll leave it up to someone more versed
with the rest of Gerrit (Ryan?)
If there are other github repositories *not* in the wikimedia github
account, it shouldn't be hard to add those to the consideration in this
P.S., a word to the wise: don't try to parse github's API requests with
bash, it's just not worth it.
P.P.S., for those who like unified counts, adding this python script to
the end of the previous bash script should be easy enough, so you could
get all of the contributors (95!) in one command if you wanted.
Contractor, Wikimedia Foundation
mtraceur [at] member