Fix the regex so that merges to master are supported.
Add a git hook script that can be used to prepare a sensible merge commit message. Closes gh-21688