Bug or Feature: Org wide ruleset workflows prevent direct commits on unprotected branches #143219
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
Hi support team,
I manage an org where some repos have branch protection enabled and other repos have branch protection disabled. I setup an org wide ruleset workflow to enforce some checks against every pull request in the org. Doing so, I realized that having any org ruleset workflow requirement means that devs cannot push a direct commit to the target branch (in our case
Default
) even on the repos with branch protection disabled. The reason is two fold:https://docs.github.com/en/enterprise-cloud@latest/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/available-rules-for-rulesets#supported-event-triggers
The combination of 1 and 2 means that devs cannot push a direct commit to main/master even on the repos with branch protection disabled.
Is this a possible bug or design oversight on the GitHub side? Or am I missing something (maybe obvious) that would enforce my org wide ruleset workflow on all pull requests to
main
but would still let devs make direct commits tomain
on repos that have branch protection disabled? One possible fix is to add thepush
event to the list of supported ruleset workflow triggers. Another possible fix is to add an option in the ruleset settings to only enforce the ruleset in the context of a pull request.I hope that makes sense. If you need any more details let me know.
Thanks in advance,
Matt
Beta Was this translation helpful? Give feedback.
All reactions