The backend is pretty much ready, but the UI is very much WIP - so not much to see there.
This app imports issue data from Github and provides an UI to analyse it:
- Who (re-)opened the most issues?
- What team does this person belong to?
- What client has the most issues?
- Visualise data over time
- Leaderboard
This is useful for organisations that use Github issues as a system for code review. Each opened issue is comparable to a pull request.
The Github API has quite strict rate limits + does not expose the data in a format we need. Therefore the backend service imports all the data from Github to make sure we don't have issues with rate limits and we can query the data with acceptable latency.
- React
- Less
- Express Server
- Babel loader
- Gulp + Webpack
- We use NeDB as datastore. There's no setup required, so deploying this app is super easy. NeDB's API is a subset MongoDB's. So should this ever require a more scalable solution it's easy to replace NeDB with MongoDB.
- GET -
/events
Returns a list of events - either issues opened or reopened. - GET -
/labels
Returns a list of labels. - GET -
/users
Returns a list of users. - POST -
/update
Updates data from GitHub.
See config.example.js
. There are 3 main sections:
See Preload data
Set you secret token here (see docs)
This is an array of RegExps which are use to match labels as teams.
An object of users. Not required but allows to show clear names for users and assign them to teams.
- Start the dev server by running
$ gulp
- Visit http://localhost:4000
- Debug tools: http://127.0.0.1:9999/?port=5858
- If node-inspector blocks the port run
kill -9 $(ps aux | grep '\snode\s' | awk '{print $2}')
- If Node Inspector doesn't work make sure you're on node <= 6.3.1
There's a specific operation to load historic data. To make sure you stay within the GitHub API rate limit and you don't trigger their abuse detection you should import issues in batches. These batches should be max ~1000 issues at once.
- Set the values in
config.js
and updatefrom/to
for each batch:
import: {
from: 6200, // issue number
to: 7000, // issue number
timeout: 500, // time between requests
delay: 5000, // time before first request
logDate: '2016-05-01T00:00:00.000Z' // sinceDate written to import logs
}
- Run
node --debug src/server/init.js
Install live reload plugin for your browser (e.g. RemoteLiveReload for Chrome) to instantly see your changes in the browser when a client side file (jsx/js/less/css/html) changes.