Skip to content

Add Danger warning when ci templates are modified

Kasia Misirli requested to merge 435123/Add_dangerbot_warning into master

What does this MR do and why?

Resolves #435123 (closed) This MR is refactoring the danger rule and adding a spec file to it. Its also adding a warning (see danger comment which was triggered as I have modified a ci_template in this MR for testing) when ci_templates files are modified, the corresponding ci component needs to be modified.

Allowing ci templates danger messages/warnings in ci is out of scope for this issue.

I created another issue to look closer into that danger file and possibly make the warning visible in the command line instead.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

When Ci templates are modified, the warning will be shown: Screenshot_2024-02-29_at_11.59.17

Looks like ci templates are set to not be visible in ci env, after I commented out that logic, I was able to see the warning in the command line: Screenshot_2024-02-29_at_11.35.00

How to set up and validate locally

Make a change in one of the ci_templates e.g. ruby file and push the change up, the warning will be seen in the MR body.

Edited by Kasia Misirli

Merge request reports