Skip to main content

Allowing repository admins to rename branches with organization rulesets

Organization owners can allow people with repository admin permission to rename branches that are targeted by organization rulesets.

Кто может использовать эту функцию?

Organization owners can manage this setting.

Organization owners control whether repository administrators can rename branches that are targeted by one or more branch rulesets. For existing organizations, this setting is off by default. For newly created organizations, this setting is on by default.

When this setting is enabled, repository administrators can rename these branches, provided the new branch name is still targeted by all the same organization rulesets as the current branch name. This ensures that rulesets cannot be circumvented through branch renaming.

Organization administrators can rename branches targeted by organization rulesets without restriction.

Примечание.

Even with this setting enabled, changing the default branch of a repository still requires an organization administrator when organization rulesets are in play.

  1. В правом верхнем углу GitHub, щелкните рисунок профиля, а затем выберите октикона "организация" aria-hidden="true" aria-label="organization" %} Ваши организации.

  2. Выберите организацию, кликнув по ней.

  3. Под именем организации щелкните Settings. Если вкладка "Параметры" не отображается, выберите раскрывающееся меню и нажмите кнопку "Параметры".

    Снимок экрана: вкладки в профиле организации. Вкладка "Параметры" выделена темно-оранжевым цветом.

  4. В разделе "Access" боковой панели щелкните Член привилегий.

  5. Under "Branch renames", select Allow repository administrators to rename branches protected by organization rules.

  6. Click Save.

Further reading