Add Change-Id to regex 51/68251/1
authorSam Hague <shague@redhat.com>
Wed, 14 Feb 2018 16:40:30 +0000 (11:40 -0500)
committerSam Hague <shague@redhat.com>
Wed, 14 Feb 2018 16:40:30 +0000 (11:40 -0500)
Change-Id: Ib1b29a247398d1d10fcdfe2368ea2b356ef7eb3e
Signed-off-by: Sam Hague <shague@redhat.com>
tools/distchanges/changes.py

index 2b9ca713a0381a8bee10e119bea647af53224ac0..54b2f8ebcc7eca5b3d442271db7414abb308cc52 100644 (file)
@@ -101,7 +101,7 @@ class Changes(object):
         self.verbose = verbose
         self.projects = {}
         self.set_log_level(verbose)
-        self.regex_changeid = re.compile(r'\bI([a-f0-9]{40})\b|\bI([a-f0-9]{8})\b')
+        self.regex_changeid = re.compile(r'Change-Id.*: \bI([a-f0-9]{40})\b|\bI([a-f0-9]{8})\b')
         # self.regex_shortmsg = re.compile(r'"([^"]*)"|(git.commit.message.short=(.*))')
         self.regex_shortmsg1 = re.compile(r'(git.commit.message.short=.*"([^"]*)")')
         self.regex_shortmsg2 = re.compile(r'(git.commit.message.short=(.*))')
@@ -274,7 +274,7 @@ class Changes(object):
 
         logger.info("did not find Change-Id from git.properties in %s, trying commitid", project)
 
-        # match a 40 or 8 char Change-Id hash. both start with I
+        # match a git commit id
         commitid = self.regex_commitid.search(pfile)
         if commitid and commitid.group(2):
             logger.info("trying commitid from git.properties in %s: %s", project, commitid.group(2))