In order to deploy cla-bot on AWS, please follow the steps below.
Within the cla-bot sub-folder, rename serverless.env.example.yml to serverless.env.yml and fill in the required information for each of the stages you want to construct.
Please note that - if GITHUB_ACCESS_TOKEN is defined, INTEGRATION_ENABLED MUST be set to false (otherwise the GitHub Access Token will not be used and the cla-bot will fail accessing clabot-config, if private)
The cla-bot uses the serverless framework to manage the deployment of lambda functions, AWS gateway etc ...
You can deploy the stack for a given stage as follows:
serverless deploy --stage dev
- Log into Github.com
- Access https://github.com/settings/apps/new
- Set homepage URL to https://colineberhardt.github.io/cla-bot
- Set
User authorization callback URLandWebhook URLtohttp://google.com; you'll change it later on, as soon as the APIs are properly configured - Set
Homepage URLtohttps://colineberhardt.github.io/cla-bot - On Permissions:
Repository contentsset toRead-onlyIssuesset toRead & writePull requestsset toRead & writeCommit statusesset toRead & write
- On
Subscribe to Events, check:Pull RequestStatusIssue comment
- Set
Only on this accounttoWhere can this GitHub App be installed? - Click on
Save - Click on
Generate Private Keyand download it locally - Save
INTEGRATION_KEYas the local path to the downloaded file,INTEGRATION_IDas the 4-digits number reported on the top right of the Github App screen andBOT_NAMEas the name of the Github App
Click on the Install button (top-right of Github App page) and enable it only for the current account, only on one repository.
Important! Make sure that you also add clabot-config repository at org level, if you want to use the same configuration across all org repositories.
In the permissions tab, add all the items reported in the screenshot posted in this gist comment
Follow github docs and save the generated token as GITHUB_ACCESS_TOKEN; no scopes or permissions must be defined, all items must be unchecked; however, if you want to use a clabot-config private repository, you'd need to check repo ( Full control of private repositories).