Auto-enable Duo Code Review on first Duo add-on purchase

What does this MR do and why?

Stamp enable_duo_code_review_by_default as pending in GitlabCom::ProvisionService when a namespace acquires its first Duo add-on, so EnableCodeReviewFlowWorker enables the setting and the code_review/v1 flow. Follows the enable_duo_core_for_new_subscription hook in the same class.

Database

SELECT 1 AS one
FROM subscription_add_on_purchases
WHERE namespace_id = $1
  AND subscription_add_on_uid IN (5, 1, 3, 7)
  AND (started_at IS NULL OR started_at <= $2)
  AND ($2 < expires_on)
LIMIT 1;

References

Screenshots or screen recordings

How to set up and validate locally

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Phil Hughes

Merge request reports

Loading
Loading