peril
peril copied to clipboard
Support Peril plugins
An example would be a wrapper for danger-plugin-spellcheck.
- It would be able to declare itself into the rules (in this case, on any PR)
- It would be able to eval a dangerfile (in this case, basically just the default settings)
- It would be declared inside the JSON?
This is interesting but I don't think all plugins would benefit from being automatically declared in the rules. Sometimes it makes sense if there is only one possible use case, other times I would want more control.
I do think a lot of these plugins like Aeryn should be turned into official packages. Right now I just keep copying + pasting the same source code and tests across all repos. Maybe a DangerCommunity could house all these things?
Today a few Peril plugins exist, but they're internal: https://github.com/danger/peril/tree/master/source/plugins
and get called from https://github.com/danger/peril/blob/e56955b3b2a91e77ebc61d856db07120b8518121/source/routing/router.ts#L11-L39
I think it'd need to be declared somehow (probably in the settings.json
) so that it can work on the main public Peril rather than just on a self-hosted version.
It is possible that there are two APIs, the internal one (full webhook access) or a rules based system.
WRT centralizing them, I'm not certain yet, that comes at complexity and makes your peril-settings less explicit.