Rename protected_branches association

The following discussion from !157364 (merged) should be addressed:

  • @vyaklushin started a discussion: (+2 comments)

Currently, project.protected_branches returns only protected branches for the project (without group-level protected branches). But for majority of validations we want to consider all possible protected branches (project + group level).

As a option, we can try to migrate the code to use the following naming for associations. Something like:

  • project.project_protected_branches
  • project.group_protected_branches
  • project.all_protected_branches

That should prevent developer from using project.protected_branches with an assumption that this method also considers group-level protected branches.

Edited Jun 19, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading