tools: Add support for Jira RHEL-XXX issues
Related: RHEL-22656
(cherry picked from commit 95d984f81d
)
This commit is contained in:
parent
3eb094df3b
commit
1609d4de77
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user