diff --git a/tools/git-changelog b/tools/git-changelog index 032ad94..c8cf60e 100755 --- a/tools/git-changelog +++ b/tools/git-changelog @@ -65,13 +65,14 @@ class ChangeLog: # summary line format is ^.*#([0-9]+).* # Make sure the bz# isn't likely to be a github issue for line in msg: - m = re.match(r"^(Resolves|Related|Conflicts):\ +rhbz#(\d+)", line) - if m and m.group(1) and m.group(2): - bugs.append((m.group(1), m.group(2))) + m = re.match(r"^(Resolves|Related|Conflicts):\ +(rhbz#|RHEL-)(\d+)", line) + if m and m.group(1) and m.group(2) and m.group(3): + bugs.append((m.group(1), m.group(2), m.group(3))) else: + # Assume summary line references are still rhbz# only m = re.match(r"^.*#(\d+).*", line) if m and m.group(1) and int(m.group(1)) > 100000: - bugs.append(("Resolves", m.group(1))) + bugs.append(("Resolves", "rhbz#", m.group(1))) return bugs @@ -99,8 +100,8 @@ class ChangeLog: author = self._getCommitDetail(commit, "%aE") msg = ["%s (%s)" % (summary.strip(), author)] - for r, bz in self.getBugs(long): - msg.append("%s: rhbz#%s" % (r, bz)) + for r, kind, bz in self.getBugs(long): + msg.append("%s: %s%s" % (r, kind, bz)) log.append(msg) return log