This extension provided a build task called "Commit Comment Validator" which allows teams to validate that either some or all commits in pull requests conform to a supplied regular expression.
How to use
After installing the extension, you can add the task to your pipeline.
This task has only been tested against Azure DevOps repositories. Also there are known issues with regular expression parsing with older versions of Node.
At the moment this code is private but we would consider opening it up to the public. Please send an email if you'd be interested in contributing and we may consider opening a public repository.