Organization Ruleset blocking a repo from changing "default" branch #212379
Replies: 1 comment
|
Hi! Here is why GitHub's ruleset engine treats renaming and changing/switching the default branch differently under organization rulesets: 1. How Rulesets Target the Default BranchOrganization rulesets often target branches using the dynamic "Default branch" selector rather than an explicit static name like
2. How to Work Around ThisTo allow a repository to switch its default branch when an organization ruleset is active:
|
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Question
Body
This is in regards to this changelog: https://github.blog/changelog/2026-05-07-repository-rulesets-user-bypass-and-branch-renaming/
So, this lets user rename the default branch. However, this doesn't let user change the default branch, even if the new branch name remains within the scope of every ruleset that applied to the original name.
I'd like this logic to apply to both rename as well as change operations. If I'm changing to another branch, and that branch is covered by the same Rulesets as the old branch, then why block the change?
All reactions