Skip to content

Import/Export - Protected Branch: Settings not migrated properly

Sometimes when using Project Import the protected branches are not imported as expected, due to the validation error:

ProtectedBranch::MergeAccessLevel#project delegated to protected_branch.project, but protected_branch is nil: #<ProtectedBranch::MergeAccessLevel id: nil, protected_branch_id: nil, access_level: 40, created_at: \"2022-11-24 03:27:59.574000000 +0000\"

image

Steps to reproduce:

  1. Create a project
  2. Create a few project members
  3. Create protected branches with both role and users assigned
  4. Export project and import it to a new destination
  5. Observe not all protected branches are migrated
Edited by George Koltsov