Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 1.46 KB

local-setup.md

File metadata and controls

42 lines (31 loc) · 1.46 KB

Local setup

Getting Code Locally

$ git clone https://github.com/electron/trop
$ cd trop
$ npm install

Configuring the GitHub App

To run your app in development, you will need to configure a GitHub App to deliver webhooks to your local machine.

  1. Go to smee.io and click Start a new channel.
  2. Create a .env file (example found here)
  3. Set WEBHOOK_PROXY_URL in your .env file to the URL that you are redirected to.
  4. Create a new GitHub App
  • Webhook URL: Use your WEBHOOK_PROXY_URL from the previous step.
  • Webhook Secret: development
  • Permissions: Dependent on your use case
    • If you enable excess permissions during development, remember to remove them in production.
  1. Download the private key as private-key.pem into the repository’s directory
  2. Set your APP_ID in your .env file
  3. Update your GitHub App’s Webhook URL to your smee.io URL.
  4. Run $ npm start to start the server.

Testing

# run the test suite
$ npm test

Debugging

  1. Always run $ npm install and restart the server if package.json has changed.
  • To turn on verbose logging, start server by running: $ LOG_LEVEL=trace npm start
  1. robot.log('some text') is your friend.

  2. To test changes without triggering events on a real repository, see simulating webhooks