Skip to content

[Step 2] Create class SnippetRepositoryStorageMove

After creating the table in #218984 (closed), we need to create a class to store the logic we need. This class is very similar to ProjectRepositoryStorageMove. The only differences will be the relation to the owner object, one validation, and the after_transition initial: :scheduled block.

Since this class has a lot in common with ProjectRepositoryStorageMove we can refactor it and move it to a concern/parent.

For the after_transition block, since the SnippetUpdateRepositoryStorageWorker won't be implemented until #218991 (closed), we will make it a no-op block.

We need to add the relation to the Snippet model.

Edited by Chad Woolley