title: How to check that git commits contain string pattern in message?
body: <p>I have a GitLab repository with some projects. I want to check that commits messages contain regex string pattern ('[0-9]{3}', for example) for someone who want to push he's commits to the project. If there is no string pattern in user's commit messages then return message "Your commit's message doesn't contain necessary string pattern" for that user.</p>
  
  <p>I know that there is git hooks and I can write my own here: <code>/var/opt/gitlab/git-data/repositories/root/awesome.git/custom_hooks/pre-receive</code> but how can I retrive user's commits messages?</p>