hooks: add some commit message hooks

Allow repos to enforce Bug: and Change-Id: fields in the commit message.
We need to extract & plumb down the commit message to all the hooks now.

Bug: 28288284
Change-Id: I8c16e1e2d771569fb0721c135d41dbfeca44135c
diff --git a/pre-upload.py b/pre-upload.py
index 495a4a3..e9bdfa2 100755
--- a/pre-upload.py
+++ b/pre-upload.py
@@ -164,14 +164,14 @@
         # Mix in some settings for our hooks.
         os.environ['PREUPLOAD_COMMIT'] = commit
         diff = rh.git.get_affected_files(commit)
+        desc = rh.git.get_commit_desc(commit)
 
         results = []
         for hook in hooks:
-            hook_results = hook(project, commit, diff)
+            hook_results = hook(project, commit, desc, diff)
             if hook_results:
                 results.extend(hook_results)
         if results:
-            desc = rh.git.get_commit_desc(commit)
             if not _process_hook_results(project.name, commit, desc, results):
                 ret = False