A web application that provides beautiful charts based on data found in github issues and comments.
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.
npm install
./node_modules/.bin/browserify -t reactify public/*.js -o public/js/bundle.js
GHTOKEN="$(< .env)" NODE_ENV=production node github-analytics.js
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
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
Try the following urls to get an idea of how the app works:
- http://localhost:3000
- http://localhost:3000/api/issues
- http://localhost:3000/?user=devstaff-crete&repo=DevStaff-Heraklion&labels=Topics&state=open&terms[]=:%2B1:&terms[]=test&speakerTerms[]=testing&reactionVotes[]='-1'&exclusive=1&per_page=100
- http://localhost:3000/api/issues/?user=devstaff-crete&repo=DevStaff-Heraklion&labels=Topics&state=open&terms[]=:%2B1:&terms[]=test&speakerTerms[]=testing&reactionVotes[]='-1'&exclusive=1&per_page=100
- 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]+$.