This commit is contained in:
Shelley Vohr 2018-03-13 13:30:30 +09:00
Родитель e6bf4edb4f
Коммит e5eb0f7332
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: F13993A75599653C
1 изменённых файлов: 35 добавлений и 0 удалений

35
docs/local-setup.md Normal file
Просмотреть файл

@ -0,0 +1,35 @@
## Local setup
### Getting Code Locally
```sh
$ git clone https://github.com/codebytere/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](https://smee.io/) and click **Start a new channel**.
2. Set `WEBHOOK_PROXY_URL` in `.env` to the URL that you are redirected to.
3. [Create a new GitHub App](https://github.com/settings/apps/new)
- **Webhook URL:** `Use your WEBHOOK_PROXY_URL` from the previous step.
- **Webhook Secret:** `development`
- Set the permissions you'd like your app to have and the events you'd like for it to listen to.
- This will depend on what data you want your app to have access to.
- **Nota Bene:** For development we recommend enabling everything and then removing uncessary permissions later.
4. Download the private key as `private-key.pem` into the repositorys directory
5. Start the app with APP_ID=1234 npm start where 1234 is your GitHub Apps ID
5. Update your GitHub Apps Webhook URL to your [smee.io](https://smee.io/) URL.
6. Run `$ npm start` to start the server.
### 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
2. `robot.log('some text')` is your friend.
2. To test changes without triggering events on a real repository, see [simulating webhooks](https://probot.github.io/docs/simulating-webhooks/)