/org-pr-stats

App to query the GitHub API for pull request stats on a given organization

Primary LanguageJavaScriptMIT LicenseMIT

Org PR Stats

Build Status

Org PR Stats is a node app to query the GitHub API for pull request stats on a given organization. It was created as a solution to a take home interview question.

Getting started

There are two ways to run the application, directly on your machine or in a docker container. Either process requires the same initial process:

  1. Clone the repository git clone https://github.com/JordanMajd/org-pr-stats.git
  2. Navigate into the repo cd org-pr-stats.
  3. Set up a .env file with the name of the github organization to query.
  • Copy the example .env file: cp .env.example .env
  • Change GH_ORG="servo" to GH_ORG="<YOUR ORG HERE>".
  • Change GH_USER="octocat" to GH_USER="<YOUR USER NAME HERE>".
  • Change GH_OAUTH="yourtoken" to GH_OAUTH="<YOUR OAUTH TOKEN HERE">. (You'll need to create a personal access token in your developer settings)

Direct

To run the application directly on your machine, ensure it is set up for Node.js development.

  1. Install the dependencies: npm install
  2. Run the application: npm start

Docker

If you prefer to use docker, getting started is fairly straight forward.

  1. Build the docker image: npm run build-docker
  2. Run the container: npm run start-docker

Depending on your user permissions, you may need to run the docker commands with sudo.

Tests

When making changes to the project be sure to write unit tests for the changes and ensure the application passes the tests.

To run the unit tests use the command npm test.

License

  • MIT, see LICENSE for more details.