All Projects β†’ mirego β†’ dispatch

mirego / dispatch

Licence: BSD-3-Clause license
πŸ¦€ Dispatch makes sure pull requests within a GitHub organization get reviewed by the right people.

Programming Languages

elixir
2628 projects
Makefile
30231 projects
Dockerfile
14818 projects
shell
77523 projects

Projects that are alternatives of or similar to dispatch

Owasp Orizon
Owasp Orizon is a source code static analyzer tool designed to spot security issues in Java applications.
Stars: ✭ 130 (+490.91%)
Mutual labels:  code-review
Awesome Code Review
An "Awesome" list of code review resources - articles, papers, tools, etc
Stars: ✭ 3,205 (+14468.18%)
Mutual labels:  code-review
localhost-sonarqube
Analysing source code locally with SonarQube in a Docker environment.
Stars: ✭ 17 (-22.73%)
Mutual labels:  code-review
Gerrit Rest Java Client
Java REST client for Gerrit Code Review
Stars: ✭ 133 (+504.55%)
Mutual labels:  code-review
Github Review
Github code reviews with Emacs.
Stars: ✭ 210 (+854.55%)
Mutual labels:  code-review
effective-code-review
Presentation about my process for making code reviews as effective as possible
Stars: ✭ 63 (+186.36%)
Mutual labels:  code-review
Feram
Feram finds & fixes bugs in your commits
Stars: ✭ 122 (+454.55%)
Mutual labels:  code-review
phinder
PHP code piece finder
Stars: ✭ 54 (+145.45%)
Mutual labels:  code-review
Code Review Checklist
This code review checklist helps you be a more effective and efficient code reviewer.
Stars: ✭ 214 (+872.73%)
Mutual labels:  code-review
gh-code-review-assistant
(no longer maintained) GitHub Code Review Assistant tool is a userscript (lightweight extension) for Firefox / Chrome
Stars: ✭ 29 (+31.82%)
Mutual labels:  code-review
Lookout
Assisted code review, running custom code analyzers on pull requests
Stars: ✭ 140 (+536.36%)
Mutual labels:  code-review
Hound
Automated code review for GitHub pull requests.
Stars: ✭ 1,904 (+8554.55%)
Mutual labels:  code-review
code-review
Automated static analysis & linting bot for Mozilla repositories
Stars: ✭ 51 (+131.82%)
Mutual labels:  code-review
Nodejsscan
nodejsscan is a static security code scanner for Node.js applications.
Stars: ✭ 1,874 (+8418.18%)
Mutual labels:  code-review
dx-scanner
CLI tool that allows you to measure quality of a team work and an app based on your source code.
Stars: ✭ 79 (+259.09%)
Mutual labels:  code-review
Vscode Pull Request Github
GitHub Pull Requests for Visual Studio Code
Stars: ✭ 1,769 (+7940.91%)
Mutual labels:  code-review
abapOpenReview
ABAP Review Tool
Stars: ✭ 19 (-13.64%)
Mutual labels:  code-review
FastLint-Issues
FastLint finds & fixes bugs in your commits
Stars: ✭ 123 (+459.09%)
Mutual labels:  code-review
inline-plz
Inline your lint messages
Stars: ✭ 32 (+45.45%)
Mutual labels:  code-review
z-pot
project overview tool, used to analyze the amount of code, the number of files, code statistics and so on.
Stars: ✭ 18 (-18.18%)
Mutual labels:  code-review


Dispatch makes sure pull requests within a GitHub
organization get reviewed by the right people.


Section Description
πŸ‘‹ Introduction What is this project?
🚧 Dependencies The technical dependencies for the project
🏎 Setup Setup instructions to quickly kickstart the project development
πŸ— Code & architecture Details on the project modules and components
πŸ”­ Possible improvements Possible refactors and ideas
πŸš‘ Troubleshooting Troubleshooting information for potential problems
πŸš€ Deploy Instructions on how to deploy the application

πŸ‘‹ Introduction

What is Dispatch?

Dispatch gets notified about pull requests opened in GitHub projects. It then selects random users (based on existing contributors and stack-skilled developers) and requests their review.

How to use it?

Everything is done via a simple GitHub webhook:

Field Value
Payload URL https://my-dispatch-app.com/webhooks
Content type application/json
Events Send me everything.

Webhook query string parameters

Parameter Default value Description
stacks "" Comma-separated values of project’s stacks (e.g. elixir,graphql)
disable_learners false Disable learners for this repository

Features

Smart reviewer selection

When a pull request is opened, Dispatch selects a list of users that will be requested for a review:

  • One recent repository contributor
  • One reviewer per stack
  • One or many learners per stack (who will only be mentionned in the request comment)

Ignoring pull requests

Draft pull requests or pull requests with a title that begins with WIP , WIP: or [WIP] will be ignored. Pull requests that do not belong to repositories inside the configured organization (GITHUB_ORGANIZATION_LOGIN environment variable) will also be ignored.

Pull request-specific stacks

From time to time, it can be useful to pass some specific stacks for a single pull request that differ from the ones used in the Webhook URL. #dispatch/<stack> tags can be added to the pull request body and Dispatch will use them as stacks instead of the default ones (configured in the webhook URL).

Contributors blocklist

GitHub users listed in blocklist will never be requested for a review nor mentionned.

Learners

GitHub users listed in learners will not be requested for a review. Instead, they will only be mentionned in the request comment. The exposure variable is used to mention the corresponding user to a percentage of the pull requests of that stack. For example, a user with an exposure factor of 0.75 would have a 75% chance of getting a mention for each pull request of that stack.

Absence.io

If an Absence.io iCal URL is provided, users that are out-of-office when a pull request is opened will never be requested for a review.

🚧 Dependencies

  • Elixir (1.8.1)
  • Erlang (21.2.5)

🏎 Setup

Environment variables

All required environment variables are documented in the .env.dev file.

When running mix or make commands, all of these variables must be present in the environement. To achieve this, we can use source, nv or another custom tool.

Initial setup

  1. Create an .env.dev.local file from .env.dev
  2. Install Mix dependencies with make dependencies
  3. Compile the application mix compile
  4. Start a Phoenix development server with iex -S mix phx.server after loading .env.dev and .env.dev.local files into the environment

make commands

A Makefile file is present and expose several common tasks. The list of available tasks can be viewed with make help.

Tests

Tests can be ran with make test and test coverage can be calculated with make test-coverage.

Lint

Several linting and formatting tools can also be ran to ensure coding style consistency:

  • make lint-format makes sure all Elixir code is properly formatted
  • make lint-credo makes sure all Elixir code conforms to our best practices and guidelines
  • make lint-compile makes sure all Elixir compiles without warnings

All these commands can be executed at once with the handy make lint command.

Continuous integration

The priv/scripts/ci-check.sh script runs a few commands (tests, lint, etc.) to make sure the project and its code are in a good state.

πŸ— Code & architecture

Experts, learners and blocklisted users

The configuration file stored at CONFIGURATION_FILE_URL should contain a JSON object with three keys:

  • blocklist
  • reviewers
  • learners
{
  "blocklist": [
    {
      "username": "github_username"
    }
  ],
  "reviewers": {
    "stack_name": [
      {
        "username": "github_username"
      }
    ]
  },
  "learners": {
    "stack_name": [
      {
        "username": "github_username",
        "exposure": 0.25
      }
    ]
  }
}

πŸ”­ Possible improvements

Description Priority Complexity Ideas
Improve the link between Absence.io users and GitHub users Moderate Moderate For now, we simply match both full names β€” this is error-prone

πŸš‘ Troubleshooting

Why no reviews or fewer reviews were requested?

The most common reasons as to why reviews were not requested after a pull request was opened:

  • The user associated with the GitHub access token does not have β€œwrite” access to the repository
  • The pull request title started with WIP , WIP: or [WIP] when it was first opened

The most common reasons as to why there was fewer requested reviews that usual (for the same repository) on a pull request:

  • There are no other active contributors to the repository other than the pull request creator
  • There are no other reviewers for the repository stacks other than the pull request creator

πŸš€ Deploy

The application can be deployed to Heroku following the Container Registry & Runtime guide.

tl;dr

  1. Create a docker image for the OTP release (DOCKER_IMAGE_TAG=latest is the default value).

    > make build DOCKER_IMAGE_TAG=latest
  2. Tag the image for Heroky’s registry

    > docker tag dispatch:latest registry.heroku.com/dispatch/web
  3. Login to the Heroku registry

    > heroku container:login
  4. Push the image to the registry

    > docker push registry.heroku.com/dispatch/web
  5. Release the image

    > heroku container:release web

License

Dispatch is Β© 2018-2019 Mirego and may be freely distributed under the New BSD license. See the LICENSE.md file.

About Mirego

Mirego is a team of passionate people who believe that work is a place where you can innovate and have fun. We’re a team of talented people who imagine and build beautiful Web and mobile applications. We come together to share ideas and change the world.

We also love open-source software and we try to give back to the community as much as we can.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].