Skip to content

Danger: Provide a single interface for adding suggestions

Peter Leitzen requested to merge pl-tooling-danger-spec-refactor into master

What does this MR do and why?

This MR refactors Danger's suggestions internals for "specs" by extracting the suggestion logic into own classes (with its own specs).

Previously, suggestions were methods called like add_suggestions_for_X inside tooling/danger/specs.rb. This file grew over time and already contained three different suggestions which made reading the code overwhelming.

The MR contains several commits which demonstrates the refactoring. See individual commits for more context.

Please don't squash the commits!

How to set up and validate locally

bin/rspec spec/tooling/danger/specs

On CI

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Peter Leitzen

Merge request reports