Branch Protection: "Restrict branch creation" implies just a user-check but applies other checks too #145682
Replies: 1 comment
-
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Bug
Body
While this might not be a bug, it's definitely an unclear expectation in the UI.
We found that when we enabled
Restrict pushes that create matching branches
(above), it also began enforcingRequire linear history
on the branch creations as well.This was unexpected, as the extra description notes
Only people, teams, or apps allowed to push will be able to create new branches matching this rule.
. Also, this option is nested underRestrict who can push to matching branches
option, implying the only affect is to restrict who can create the branch, not what contents the created branch has.Note: We hit this issue because we cut release branches from our
main
. We want to ensure only a certain set of users can create and update these branches. However while we want to require linear history for later pushes to these branches (cherry-picks, etc), ourmain
branch already contains legacy merge commits. By enabling theRestrict pushes that create matching branches
, it meant that no one except an administrator could create the initial branch as they could force past the "linear history" check.I don't know if this is intended and poorly described, or an actual bug. But I wanted to raise it either way.
Beta Was this translation helpful? Give feedback.
All reactions