A Ruleset with Metadata Restrictions on Commit Messages should not block Squash Merge Pull Requests unless the sqash commit message itself violates the rule #108531
Replies: 2 comments
-
This is definitely a thing that I'd like to have enforced as expected. In the interim, I can work around this to update the ruleset to apply to all branches, but for with a squash merge, only that commit message should matter. Getting this to work as expected would reduce the burden on a developer to use conventional commits before pushing to a PR branch, and, if forgotten, they wouldn't need to go back and rewrite their commits. |
Beta Was this translation helpful? Give feedback.
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Bug
Body
I have a Ruleset which puts a regex restriction on commit messages.
I have a commit in my pull request which violates the Ruleset rule with Metadata Restrictions on commit messages.
The rule only applies to the main branch and I am making a PR from a feature branch to the main branch.
I would expect this to still allow sqaush merging but the option is disabled.
When doing a squash merge you are presented with an editor which will prepend the PR title and allow you to edit the final commit message which will be the actual commit message that is merged to the protected branch.
I would expect the metadata rule to apply to the final commit message only and not block squash merging unless the rule fails on that message, not each individual commit.
Beta Was this translation helpful? Give feedback.
All reactions