Skip to content

Warn with Danger when MR touches searchable settings sections

Thomas Hutterer requested to merge 463524-warn-with-danger into master

What does this MR do and why?

Adds a new Dangerfile that detects any changed line that contains a SettingsBlock. If any are detected, it adds a new section to the Danger comment, asking to verify that all settings sections are still searchable.

Note: This can still miss some changes, because not all settings sections are rendered with that rather new SettingsBlock component. Some are still using something like %section.many.other.classes.settings in plain Haml, some breaking their class: '... settings' even into a different line, so catching all the ways this could be done in Haml (plus Vue!) isn't realistic. This aims to be a 80:20 solution for #463524 (closed). And with more and more sections being migrated to use this SettingsBlock component, I consider it "good enough" 😄

💁 And if you want to learn more how this rather new "setting section searching" thing works, checkout !158228 (merged).

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

No visual changes in the app. This is only tooling.

How to set up and validate locally

To verify this is actually working on CI you can do this:

  • checkout this branch, create a new branch from it, mess with some settings sections in haml and vue templates, commit that and open a draft MR.
  • As soon as the danger job finished on CI, you should see a new entry in the Danger comment in your MR.
Edited by Thomas Hutterer

Merge request reports

Loading