Add spam params to request context
What does this MR do and why?
The current implementation of anti-spam in the product requires code modifications in several places in order to onboard a new spammable type. The changes require adding repeated code snippets to create a ::Spam::SpamParams object. By capturing spam params in the request context we will simplify onboarding new spammable types and DRY up the code.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
This change adds the SpamParams in the request context middleware and can be validated by running spec/lib/gitlab/middleware/request_context_spec.rb tests.
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.