Incorrect use of EE module for BaseChangesAuditor and its derived classes
Summary
We've observed incorrect usage of EE module for BaseChangesAuditor
and the classes that are derived from it. We only use the EE
module for modules that we use to prepend onto CE. For classes that only exist in EE, we just add them to ee/lib
instead of /ee/lib/ee
directory.
Improvements
If the feature being developed is not present in any form in CE, we don’t need to put the code under the EE namespace. This is as per our development guidelines.
Involved components
List files or directories that will be changed by the refactoring.
ee/lib/ee/audit/base_changes_auditor.rb
ee/lib/ee/audit/compliance_framework_changes_auditor.rb
ee/lib/ee/audit/group_changes_auditor.rb
ee/lib/ee/audit/project_changes_auditor.rb
ee/lib/ee/audit/project_ci_cd_setting_changes_auditor.rb
ee/lib/ee/audit/project_feature_changes_auditor.rb
ee/lib/ee/audit/project_setting_changes_auditor.rb
ee/lib/ee/audit/protected_branches_changes_auditor.rb
Implementation plan
- Move all the files listed above to
ee/lib
directory. - Move and update the associated RSpec files.
- Check for usage of these classes and update their invocation to point to the correct directory. For example for
ProtectedBranchesChangesAuditor
it would change fromEE::Audit::ProtectedBranchesChangesAuditor
toAudit::ProtectedBranchesChangesAuditor
Edited by Huzaifa Iftikhar