This is the configuration repo for Peril on the GatsbyJS org. There’s a settings file and org-wide dangerfiles which are inside the rules folder.
Peril is Danger running on a web-server and this repo is the configuration for that. Currently the dangerfiles in rules run on every issue and pull request for all GatsbyJS Repos.
Here are links to the relevant tools, docs, and apps we’re using:
There are three parts to enabling automations on the Gatsby GitHub organization (ignoring some of the nitty-gritty details). Those parts are:
- Events (issue comments, new pull requests etc) published from the Gatsby GitHub org to a server
- An instance of Peril which receives and responds to those events
- This settings repo which configures rules for the Peril instance
The Peril instance can also be configured to run events on a schedule.
- EmptyBody: Automatically requests more information from a user who opens a new issue with a blank body.
yarn install
code .
You will need node and yarn installed beforehand. You can get them both by running brew install yarn
.
This will give you auto-completion and types for Danger mainly.
Changes to tasks/
and rules/
will automatically be picked up by the Heroku App.
Changes to peril.settings.json
require the Heroku App to be restarted.
Changes to settings.modules
in peril.settings.json
require the app to be rebuilt on Heroku. This is to allow Heroku to install any new dependencies. See the repo for more info (TODO: add the repo).
Add the following env var to the Heroku app: DEBUG=octokit:rest*
. This will enable debug output for the GitHub API library used by Peril, allowing you to see the exact API calls that are made to GitHub.
Huge thanks to @SD10 for the initial setup help and for additional guidance along the way.
And thanks to @orta for creating Peril. This makes our lives so much easier.