danger / General

Merge on Green plugin

Merge on Green plugin

June 1, 2018 · 8:39am
@orta any chance you could extract your "Merge on Green" stuff as a Peril plugin? Shouldn't be too hard, right? I'd love to use that for Spectrum!

June 1, 2018 · 6:32pm

It's mainly a matter of figuring out what a plugin should look like, either as a function which can take any webhook ( like what my internal "plugins" are, https://github.com/danger/peril/blob/685e34cd3564c2786aeb5416a6a636623db871af/source/routing/router.ts#L21-L42 ) or whether they should define rules and their own own dangerfiles e.g. just this https://github.com/artsy/peril-settings/blob/master/peril.settings.json#L13-L14

like-fill
0
reply

but I've been so strapped for time, I've not really thought much about it

like-fill
0
reply

I like the second one a lot

like-fill
0
reply

If you showcase in the docs that you can pass an array to the event type

like-fill
0
reply

This is what my current Peril plugins look like: https://github.com/withspectrum/danger-plugin-labels

like-fill
0
reply

The nice part about that is that it allows configuration—your second version doesn't, you can't configure it

like-fill
0
reply

Yeah actually maybe mine's better 😜

like-fill
0
reply

that's a danger plugin though, not a peril one, they're different abstractions

like-fill
0
reply

Uhhh I use it with Peril haha

like-fill
0
reply

It's just called danger-plugin because I initially used it with Danger

like-fill
0
reply

It's a Danger plugin because it runs inside a dangerfile :P

like-fill
0
reply

a peril plugin should sit above that, and can also run dangerfiles

like-fill
0
reply
Your message here...

*bold*_italic_`code````codeblock```