Protected branch rules with invited groups not migrated during direct transfer

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

Summary

Protected branch rules are not properly migrated during direct transfer when an invited group is configured as "allowed to merge" or "allowed to push and merge" on the source instance.

Steps to reproduce

  1. On source GitLab instance:
    • Create a group, project and a subgroup
    • Share the project with the subgroup
    • Configure protected branch rules to allow an invited/shared group to merge or push
  2. On destination GitLab instance:
    • Initiate a direct transfer migration of the group
    • Complete the migration process
  3. Check the protected branch settings on the destination instance

What is the current bug behavior?

Protected branch rules that reference invited/shared groups are not migrated to the destination instance. The protected branches exist, but the group-based permissions are missing, potentially leaving branches with incomplete protection rules.

What is the expected correct behavior?

All protected branch rules should be migrated, including those that reference shared/invited groups. The migration should either:

  • Properly migrate the group references if the groups exist and have appropriate sharing on the destination
  • Provide clear warnings/errors about which rules cannot be migrated due to missing groups or sharing relationships
  • Document the limitation clearly if this is intended behavior

Relevant logs and/or screenshots

image__3_

image__2_

Output of checks

Reproduced on self-managed instance version 18.3.1

Results of GitLab environment info

Not applicable - this affects direct transfer migrations across instances.

Possible fixes

This may be related to the broader known issue with shared membership mapping.

Edited Sep 12, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading