Feedback: "Restrict commit metadata" Ruleset conflicts with "Squash and Merge" workflows #193197
Replies: 2 comments
-
|
💬 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.
-
|
There's a similar discussion topic here: Definitely do wish that github would prioritize this - agreed that this feature parity with gitlab would make things much easier |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Discussion Type
Product Feedback
Body
The Context
I am using the native Repository Rulesets feature, specifically Restrict commit metadata, to enforce a strict Conventional Commits standard using a Regular Expression (e.g., requiring prefixes like feat:, fix:). My repository is also configured to allow auto-merging.
The Problem
Currently, the "Restrict commit metadata" rule evaluates every individual commit on the Pull Request branch. If a developer has messy local commits (e.g.,
wip,fixed typo), GitHub throws a "Merging is blocked" error.This happens even if the developer uses
Enable auto-merge (squash)with a perfectly formatted commit message and the ultimate squashed commit would be 100% compliant with the regex.The Impact
This completely defeats the developer-experience benefits of a Squash workflow. To unblock the PR, developers are forced to do a local interactive rebase (git rebase -i) just to rewrite their temporary local commit messages to satisfy the ruleset.
Proposed Solution
It would be incredibly helpful if GitHub could bridge the gap between Rulesets and Merge Strategies. I propose this potential solution:
Native Rulesets are a fantastic feature, but making them compatible with Squash-based workflows would make them significantly more powerful for enterprise and open-source teams!
Beta Was this translation helpful? Give feedback.
All reactions