Danger: Get danger_id inside Dangerfile

Created on 10 Jul 2019  路  4Comments  路  Source: danger/danger

Is there a way to retrieve the danger_id from inside the Dangerfile?

I have a single generic Dangerfile that loads other Dangerfiles. What I鈥檇 like to do is set my danger_id to pre or post and use that as the suffix for the filename to be loaded ie Dangerfile.pre or Dangerfile.post.

Is this an ok approach to this?

Most helpful comment

This got shipped

All 4 comments

Not in the public API, but its ruby so you might be able to find it somewhere - I'd follow from the CLI down and see if any of the plugins get access to it, then see if you can get it from them

Thanks @orta! Does it make sense to have this exposed publicly and if so, is there in interest in a PR?

Seems reasonable to me, yeah

This got shipped

Was this page helpful?
0 / 5 - 0 ratings