/github-analytics

A web application that provides beautiful charts based on data found in github issues and comments. See an example at http://analytics.devstaff.gr

Primary LanguageJavaScriptMIT LicenseMIT

github-analytics

A web application that provides beautiful charts based on data found in github issues and comments.

Configuration

You are going to need a valid Github Token.

Create your token and save it in a file:

echo YOUR_GITHUB_TOKEN > .env

You can also start without a Github Token, however your requests will reach the Github API Rate Limit quickly.

Installation (option 1/3)

npm install
./node_modules/.bin/browserify -t reactify public/*.js -o public/js/bundle.js
GHTOKEN="$(< .env)" NODE_ENV=production node github-analytics.js

Build & run a Docker image (option 2/3)

If you use Docker you can skip the Installation process and start with the following commands. Keep in mind you must have a node.js docker image installed (docker pull node).

Build the docker image:

docker build -t github-analytics .

Choose the environment (NODE_ENV=local|staging|production) and run your container:

docker run -p 3000:3000 -e GHTOKEN="$(< .env)" -e NODE_DEV=production --name analytics01 -t github-analytics

Use the Docker image (option 3/3)

Pull the docker image:

docker pull kabitakis/github-analytics

Choose the environment (NODE_ENV=local|staging|production) and run your container:

docker run -p 3000:3000 -e GHTOKEN="$(< .env)" -e NODE_ENV=production --name analytics01 -t kabitakis/github-analytics

Usage

Try the following urls to get an idea of how the app works:

Params

  • user (String): Required.
  • repo (String): Required.
  • labels (String): Optional. String list of comma separated Label names. Example: "bug,ui,@high"
  • state (String): Optional. open, closed, or all Validation rule: ^(open|closed|all)$.
  • terms (array of Strings): Required. The terms to search for votes in the comments of the issues.
  • speakerTerms (array of Strings): Required. The terms to search for speakers in the comments of the issues.
  • reactionVotes (array of Strings): Required. The reactions that correspond to votes of the issue.
  • exclusive (Boolean): Optional. Count terms per user rather than per comment. Can be either ommited (false) or set to 1 (true).
  • per_page (Number): Optional. A custom page size up to 100. Default is 30. Validation rule: ^[0-9]+$.

Examples