GithubHelp home page GithubHelp logo

wooodhead / assignees Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tailordev/assignees

0.0 1.0 0.0 2.57 MB

:eyeglasses: Code reviews for everyone.

License: MIT License

JavaScript 71.01% CSS 7.24% HTML 21.75%

assignees's Introduction

Assignees

CircleCI

Assignees does automatically code review requests on GitHub (currently). This project is based on the hackathon-starter ❤️ and it is a side project developed in a couple days for our needs (and also for fun).

Usage

Web application

The application is available at: https://app.assignees.io/.
⚠️ As of April 2018, our public instance is not available anymore, sorry.

See the next section if you want to host it yourself.

Command line

This project provides a command line tool to perform various operations. You can run it via Yarn:

$ yarn run assignees

In development environment, you should run the command above within a app Docker container:

$ docker-compose run --rm app yarn run assignees
yarn run v0.19.1
$ node bin/assignees

Usage: assignees [options] [command]


Commands:

    feature:add [username] [feature]                       add feature to user
    feature:remove [username] [feature]                    remove feature to user
    feature:list [username...]                             list enabled features of user
    pr:process [options] [repositoryId] [number] [author]  process pull request

Options:

    -h, --help     output usage information
    -V, --version  output the version number

Installation

This project provides a Docker Compose configuration to quickly build and start it. Clone the project, then run:

$ docker-compose up -d app

The application will shortly be accessible at: http://assignees.localdev:3000/.

Important: you must configure your local DNS to be able to use assignees.localdev in the URL. You can edit your /etc/hosts file, but it is recommended to install and configure Dnsmasq. This link is a good tutorial.

Limitations

The docker-compose.yml contains my credentials (for an application that does not exist anymore at the time of writing by the way). You should register a new OAuth application on your own.

It is also recommended to use ngrok if you plan to test webhooks from your development environment.

Configuration

This project is configured with environment variables. Here is the list:

  • ADMIN_IDS: a comma-separated (without space) list of GitHub user identifiers (not usernames) to grant admin rights to certain users;
  • APP_DOMAIN: the domain that points to this application (for redirecting traffic from Heroku *.herokuapp.com domain for instance);
  • GITHUB_ID: the GitHub ID you get when you register a GitHub (OAuth) application;
  • GITHUB_SECRET: the GitHub secret tied to the previous GitHub ID;
  • GITHUB_APP_ID: the identifier of the application you had to register on GitHub;
  • GITHUB_WEBHOOK_SECRET: a randomly generated value (like a password) used to sign and verify GitHub webhooks requests.
  • GITHUB_WEBHOOK_URL: the webhook URL that will be registered on each project enabled by Assignees (e.g. https://app.assignees.io/events);
  • MONGODB_URI: the MongoDB data source name (e.g. mongodb://user:pass@server/db). This variable is automatically set if you use the mLab add-on on Heroku. Alternatively, you can use the MONGOLAB_URI environment variable;
  • SESSION_SECRET: a randomly generated value to prevent session tampering.

Also, setting NODE_ENV to production looks like a good idea.

N.B. because of the Yarn incompatibility on Heroku, I set NODE_MODULES_CACHE to false and NPM_CONFIG_PRODUCTION to true.

New Relic

To monitor the application at an early stage, it is possible to use New Relic APM. These extra environment variables could be useful (at least on Heroku):

  • NEW_RELIC_APP_NAME;
  • NEW_RELIC_LICENSE_KEY;
  • NEW_RELIC_LOG (automatically set by Heroku when enabling the add-on);
  • NEW_RELIC_NO_CONFIG_FILE should be set to true;
  • NEW_RELIC_SKIP_NATIVE_METRICS should be set to true.

Note: this commit has disabled New Relic on this project. You can re-enable it by yourself by requiring the newrelic package in both the package.json file and the code.

Other settings

You may want to change the name of the project, the contact email address, or the Piwik tracking code by editing the views/global-mixins.pug template.

Running the Tests

$ [docker-compose run --rm app] yarn run test

License

Assignees is released under the MIT License. See the bundled LICENSE file for details.

assignees's People

Contributors

willdurand avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.