Skip to content

Latest commit

 

History

History
 
 

peril

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Gatsby's Peril Settings

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.

tl;dr for this repo

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.

How it works

Relevant tools

Here are links to the relevant tools, docs, and apps we’re using:

How the pieces fit together

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

Gatsby Peril event sequence diagram

View source for the diagram

The Peril instance can also be configured to run events on a schedule.

What is this project?

  • EmptyBody: Automatically requests more information from a user who opens a new issue with a blank body.
  • InviteCollaborator: Automatically invite all contributors who merge a PR into the GatsbyJS org to become members of the @gatsbyjs/maintainers team.

To Develop

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.

To Deploy

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).

Debugging

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.

Acknowledgments

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.

Roadmap

See this epic for additional work planned in this repo. (Works best with the ZenHub extension.)