Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Latest commit

History

History
49 lines (38 loc) 路 2.01 KB

deploy.md

File metadata and controls

49 lines (38 loc) 路 2.01 KB

Deploying

If you would like to run your own instance of this plugin, you can do so by forking this repo and deploying it to your own servers or run it locally.

The Probot deployment guide describes this as well.

Create a GitHub App and configure the permissions & events with the following:

Settings:

  • GitHub app name - Your app name
  • Webhook URL - Your webhook url for listening to events (for local deployments you can use smee.io)
  • Webhook secret - Your generated webhook seceret (GitHub app page has instructions on how to create this)

Permissions:

  • Checks - Read & Write
  • Issues - Read & Write
  • Repository metadata - Read Only
  • Pull requests - Read Only
  • Commit Statuses - Read & Write
  • Single File - Read-only
    • Path: .github/mergeable.yml
  • Repository Contents - Read-Only
  • Repository projects - Read-Only

And subscription to the following events:

  • Pull request
  • Pull request review comment
  • Pull request review
  • Issues

Make sure to create a private key for the app after it's been registered.

Running Locally

  1. Clone the forked repository on to your machine
  2. Globally install smee-client from with npm npm install -g smee-client
  3. Go to smee.io and create a new webhook OR use the cli by running the smee command.
  4. Copy .env.template to a new file called .env, and fill it out.
  5. Run npm run dev in your local repository
  6. Add a repository for your Github app by going to application settings
  7. Do a test pull request to check if everything is working

Possible issues

400 bad request / Error: No X-Hub-Signature found on request

This happens when you haven't configured the webhook secret correctly in your locally running instance. Make sure to set the SECRET_TOKEN environment variable in .env before running npm run dev.