per·il ˈperəl noun
- serious and immediate danger. "their family was in peril".
Want to understand what the plan is? Consult the VISION.md
Peril uses Danger JS under the hood, Danger is a tool built for adding extra tests inside Pull Requests that can work at a different level of abstraction to unit and integration tests. For example, you could write tests which:
- Enforce CHANGELOGs
- Enforce links to Trello/JIRA in PR/MR bodies
- Enforce using descriptive labels
- Look out for common anti-patterns
- Highlight interesting build artifacts
- Give warnings when specific files change
... and any other rules specific to your team's culture and needs.
I want to run Peril for my org
OK, I made a quick tutorial for running a private Peril against your org.
I want to hack on Peril!
Ace, great, cool. So, it's a bit of a process. I'm not sure if this will get easier in time. It's a complex app. You can find out more here
How does Peril work?
There are some key files where the magic happens:
- source/routing/router.ts - Decide what work to with GitHub events
- source/githubevents/github_runner.ts - Figuring out what Dangerfiles to run
- source/danger/danger_runner.ts - Coordinating running the Dangerfiles
- source/runner/run.ts - Run the Dangerfile in a sandbox
This is an reasonably tested project, there's a lot in places where the code isn't going to change much now so they're slowly getting covered.