Skip to content

Refactor ApplyCampaign by introducing changesetRewirer

Administrator requested to merge mrn/refactor-apply-campaign into main

Created by: mrnugget

This is an attempt to tame the 400 line method that is ApplyCampaign.

I'm still not sure whether I like this approach. It's OOP influenced, which kinda rubs me the wrong way, for irrational reasons.

But then again, everything that happens here involves state, so making that explicit seemed better than passing 4-5 arguments to every function.

Note: this doesn't change any behaviour. It merely moves code around. All the tests are still passing.

What do you think?

(I also fixed the deleteEverything method in the test script)

Merge request reports

Loading