danger / General

Merge on Green plugin

Merge on Green plugin

danger / General · June 1, 2018 at 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 at 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

  • reply
  • like

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

  • reply
  • like

I like the second one a lot

  • reply
  • like

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

  • reply
  • like

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

  • reply
  • like

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

  • reply
  • like

Yeah actually maybe mine's better 😜

  • reply
  • like

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

  • reply
  • like

Uhhh I use it with Peril haha

  • reply
  • like

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

  • reply
  • like

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

  • reply
  • like

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

  • reply
  • like
Your message here...

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