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
Unanswered
justinmchase
asked this question in
Pull Requests
Replies: 1 comment
-
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.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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