Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support a multi-process Danger with custom runners #340

Closed
orta opened this issue Aug 17, 2017 · 1 comment
Closed

Support a multi-process Danger with custom runners #340

orta opened this issue Aug 17, 2017 · 1 comment
Labels

Comments

@orta
Copy link
Member

orta commented Aug 17, 2017

OK, now bear with me.

1st, consider this. With Peril I created the ability to see the Danger DSL for any PR:

I did this so I could make better documentation inside danger.systems, but what would happen if this were formalised a bit, and inside danger instead of Peril?

Imagine that we add a new command:danger process.

e.g. danger process - which would output the above JSON to STDOUT.

Thennnn, we also make a standard in terms of the results. Today, Danger expects results in this form:

{
  "fails": [{ "message": "Failing message Failing message" }],
  "warnings": [{ "message": "Warning message Warning message" }],
  "messages": [{ "message": "message" }],
  "markdowns": ["markdown"],
}

So what about if danger process could also take the above as STDIN. Now you can make a pipeline.

danger process > [ x ] > danger process

It leaves the really gnarly work of handling different CIs, getting all the useful data from GitHub/GitLab/BitBucket/etc, amending/creating/deleting Dangerfiles to DangerJS. A Danger runner just need to take in a DSL as JSON, and output a results JSON to STDOUT.

This means, anyone, in any language could make a Danger runner. So, there can be Swift/Rust/Go/Whatever Dangerfiles in the future.

@orta
Copy link
Member Author

orta commented Aug 28, 2017

This is in.

@orta orta closed this as completed Aug 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant