Danger: Provide a single interface for adding suggestions
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
-
ProjectFactorySuggestion
- See !117871 (comment 1357015173) -
MatchWithArraySuggestion
- See !117871 (comment 1357015156) -
FeatureCategorySuggestion
- See !117871 (comment 1357059005)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Peter Leitzen