github.com/robstrong/sad-repos


Install
go get github.com/robstrong/sad-repos

Documentation

Sad Repos

Sad repos is a tool for determining the sentiment of developers working on a repository by running a sentiment analysis on the commit messages in the Git history. To analyze the sentiment, this uses the API provided by vivekn in his repository vivekn/sentiment-web. A demo can be seen here. Each anaylsis returns a confidence level which indicates the certainty of the result. By default Sad Repos only accepts results with a confidence level of 75%. This level can be adjusted.

Sad Repos also makes an attempt to remove commits that don't represent something a developer actually wrote. For example, a merge commit is automatically generated by Git and shouldn't influence the results, so commit messages that begin with "Merge branch" are removed from the analysis. Also, Github merge commits are removed if the message starts with "Merge pull request".

Install

You should have Go installed, then run:

go get github.com/robstrong/sad-repos

Then within $GOROOT/src/github.com/robstrong/sad-repos, run:

go build

You now have a binary called "sad-repos"

Usage

To analyze a repo, run:

./sad-repos <insert github token here> robstrong/sad-repos

You can generate a Github token here. You can also analyze multiple repositories at once:

./sad-repos <insert github token here> robstrong/sad-repos docker/docker

Or adjust the minimum confidence level:

./sad-repos <insert github token here> robstrong/sad-repos docker/docker --confidence=95

Disclaimer

I make no claims for the accuracy of this tool. It's just a fun project and shouldn't be used to draw any conclusions about repositories. Also, I wrote this real fast, there's probably bugs.