So, 92 unique committers in June.  Which is way better than Ohloh has
been saying, yay.

I'd like to confirm that number, 92 unique contributors in June is absolutely correct. I've also scriptified my method, so now I can do multiple months.

Month       | Unique contributors
------------+--------------------
July so far | 60
------------+--------------------
June        | 92
------------+--------------------
May         | 77
------------+--------------------
April       | 67
------------+--------------------
March       | 34
------------+--------------------
February    | 2

A note or two: July is high because we have a lot of regular committers, I suppose. You could confirm that by graphing how many contributors are added by adding on one day at a time. My guess is you'll get a nice steep line at first that tapers out to nearly 0 at the end of 30 days. Also, I'm sure the earlier months have inadequate sample sizes to be relevant, since the extensions had to take some time to transfer over, and apparently February was just for testing.

Of course, the coolest thing is that each month so far has seen at least 10 additional contributors! :)

The script I used to generate it is attached (since it's only 1.1 kb). If you have a sane SSH setup already, you should be able to make it executable and do....

$ ./gerunique "ssh -p 29418 gerrit.wikimedia.org" 0d 30d

....and get the number of contributors for the past 30 days. It will also give you some friendly notifications, though they're largely for debugging.

The first option can be described as "how you would ssh into gerrit if you had to", and it's provided for the convenience of those people (like me) whose local username doesn't match their remote username.

Cheers,

--
Mark Holmquist
Contractor, Wikimedia Foundation
[email protected]
http://marktraceur.info
#!/bin/bash
# Script that will count the number of unique contributors to mediawiki
# projects in a specified month.
# Pass in the command you use to ssh into gerrit, the first day you want to
# include in the calculation, and the last day you want to include.

SSH=$1
EOM=$2
SOM=$3
FILTERS="age:$EOM -age:$SOM status:merged project:^mediawiki.* -owner:L10n-bot"
REMOTECOMM="gerrit query"
TMPFILE=`mktemp`
TTMPFILE=`mktemp`
CURLEN=500
RSK=""
N=0

while [ $CURLEN -eq 500 ]; do
    let N=$N+1
    LFILT=$FILTERS
    if [ "$RSK" != "" ]; then
        LFILT="$FILTERS resume_sortkey:$RSK"
    fi
    FRCOMM="$REMOTECOMM '$LFILT'"
    echo "Getting $N"
    $SSH "$REMOTECOMM '$LFILT'" > $TTMPFILE
    echo "Got it."
    CURLEN=`grep '    name:' < $TTMPFILE | wc -l`
    cat $TMPFILE >> $TTMPFILE
    grep '    name:' < $TTMPFILE | sort -u > $TMPFILE
    echo "Currently have" `wc -l < $TMPFILE`
    echo "$CURLEN results in that fetch."
    RSK=`grep sortKey $TTMPFILE | tail -c 17`
    echo "Next sort starts at $RSK."
done

TOTAL=`wc -l < $TMPFILE`
echo "$TOTAL total unique contributors."
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to