- Make sure you have Node.js version >= 8. We recommend using version 8, the one used in CI and production.
- To manage Node versions you can use nvm:
nvm install && nvm use
.
- Make sure you have Yarn available:
npm install --global yarn
We recommend cloning the repository in a folder dedicated to opencollective
projects.
git clone [email protected]:opencollective/opencollective-bot.git opencollective/bot
cd opencollective/bot
Dependencies are managed with Yarn. Run:
yarn install
- Go on smee.io
- Start a new channel
- Note the Webhook Proxy URL, we will later use it as
WEBHOOK_PROXY_URL
- Create a GitHub App
- GitHub App name:
Open Collective Bot (dev)
- Homepage URL:
http://github.com/opencollective/opencollective-bot
- Webhook URL: Use your
WEBHOOK_PROXY_URL
from the previous step. - Webhook Secret:
development
- Permissions:
- Repository contents: Read & Write
- Issues: Read & Write
- Pull requests: Read & Write
- Events
- Issues
- Pull request
-
Generate a private key and store it as
private-key.pem
in the project directory. -
Note the GitHub App Id, we will later use it as
APP_ID
Create in the project directory an .env
file with the following content:
APP_ID=<APP_ID>
WEBHOOK_SECRET=development
PRIVATE_KEY_PATH=private-key.pem
WEBHOOK_PROXY_URL=<WEBHOOK_PROXY_URL>
In a terminal, run:
yarn dev