Skip to content

Feature switch layer around Approvable and VisibleApprovable

Mark Chao requested to merge 1979-2-1 into master

CE port: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24386

What does this MR do?

Extracted from https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/8769 as it is too big.

A feature called approval_rule can be enabled anytime. After it is enabled, the new ApprovalState class will be used to calculate approval status.

Compatibility layers are added around Approvable and VisibleApprovable to direct calls to ApprovalState once the feature is enabled.

Some misc implementation around the final API MR is moved here as well, e.g. the private group masking class, and some utility query class.

For the following three files, the spec are EE specific, so moved under ee/ Its contents are unchanged apart from stubbing the feature flag.

  • spec/services/notification_service_spec.rb
  • spec/services/merge_requests/update_service_spec.rb
  • spec/models/merge_request_spec.rb

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ee/issues/8789

Does this MR meet the acceptance criteria?

Edited by Mark Chao

Merge request reports