[go: up one dir, main page]

Skip to content

Follow-up for "Add mutation to lock/unlock project paths"

Follow-up for !66186 (merged)

Problem

GraphQL mutation introduced a duplication of lock/unlock logic.

  1. PathLocksController
  2. Mutations::Projects::SetLocked

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).

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.