Follow-up for "Add mutation to lock/unlock project paths"
Follow-up for https://gitlab.com/gitlab-org/gitlab/-/merge_requests/66186 ## Problem GraphQL mutation introduced a duplication of lock/unlock logic. 1. [PathLocksController](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/app/controllers/projects/path_locks_controller.rb#L20-32) 2. [Mutations::Projects::SetLocked](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/app/graphql/mutations/projects/set_locked.rb#L37-41) ## Proposal Refactor `PathLocks::LockService` and `EE::Lfs::LockFileService` classes (and their `UnlockService` counterparts). We should remove a circular dependency (when `PathLocks::LockService` calls `EE::Lfs::LockFileService` and [it calls `PathLocks::LockService` again under some conditions](https://gitlab.com/gitlab-org/gitlab/blob/4fa241a4cfdc13753657002f70450bf2e5ac6442/ee/app/services/ee/lfs/lock_file_service.rb#L12)). Ideally, we should have a service class that takes care of the order of PathLock and LfsLock calls. That will remove the duplication of logic.
issue