You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Claus Ibsen <cl...@gmail.com> on 2015/12/05 15:11:04 UTC

Counting number of contributors to Apache Camel

Hi

So Apache Camel is a project that was created before github, and as
such its a bit harder to count how many patches we have received from
unique contributors, as back in the old days, we would write a "thanks
to" in the commit message, (if we remembered).

So I wanted to see if there was some bash script that could
potentially count "in a ballpark" range how many contributors there
has been over the years.

I am no bash ninja / perl expert (no I didn't jump on that old Camel,
only our Camel).

But here is a rude script that can count a bit. I opted to pick only
the first name of a user, as sometimes we would just say thanks to
Joe, and not Joe Washington etc.

There is a bunch of commands chained together in a nice pipes and filters style.


git log | grep -Eoi "Thanks to (.*)" | cut -d ' ' -f 3-3 | tr
'[:upper:]' '[:lower:]' | sed 's/[^[:alnum:]]/ /g' | sort -u | cut -d
' ' -f 1 | uniq | wc -l


Its the cut -d ' ' -f 3-3  that cuts the first name only. If you
change it to 3-4 you get 2 words. Also this assumes that we wrote
"thanks to" as the phrase. But there is likely other phrases in use.
But the ones I usually did was as "thanks to" so that is a lot of them
committed by me on their behalf.

I am pretty sure some better bash hacker can come up with a better
script. Also if we cut down to a reasonable size of log lines, then a
human could run through it and filter out duplicates / invalid names
etc.

Also this may count people who contributed before they do PRs.

But the output is 364.

So I guess a conservative guess could be around 250+ people
contributed before github. In github we have around 160 people. There
would be some duplicates among those, so maybe we have 350 unique
users, that contributed *code changes*. There is a lot of other users
who contributes JIRA tickets, help on mailing lists / write blogs /
give talks / and so on.





-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2