On startup, Danger reads a Dangerfile from the project root. Danger code in GitLab is decomposed into a set of helpers and plugins, all within the danger/ subdirectory, so ours just tells Danger to load it all. Danger then runs each plugin against the merge request, collecting the output from each. A plugin may output notifications, warnings, or errors, all of which are copied to the CI job’s log. If an error happens, the CI job (and so the entire pipeline) fails.
On merge requests, Danger also copies the output to a comment on the MR itself, increasing visibility.
Danger is a gem that runs in the CI environment, like any other analysis tool. What sets it apart from (for example, RuboCop) is that it’s designed to allow you to easily write arbitrary code to test properties of your code or changes. To this end, it provides a set of common helpers and access to information about what has actually changed in your environment, then runs your code!
If Danger is asking you to change something about your merge request, it’s best just to make the change.
check this site for more info : https://danger.systems
We are using danger and seeing lots of benefits !
Top comments (0)