tools: Add support for Jira RHEL-XXX issues
Related: RHEL-15122
This commit is contained in:
parent
982d982516
commit
95d984f81d
@ -65,13 +65,14 @@ class ChangeLog:
|
|||||||
# summary line format is ^.*#([0-9]+).*
|
# summary line format is ^.*#([0-9]+).*
|
||||||
# Make sure the bz# isn't likely to be a github issue
|
# Make sure the bz# isn't likely to be a github issue
|
||||||
for line in msg:
|
for line in msg:
|
||||||
m = re.match(r"^(Resolves|Related|Conflicts):\ +rhbz#(\d+)", line)
|
m = re.match(r"^(Resolves|Related|Conflicts):\ +(rhbz#|RHEL-)(\d+)", line)
|
||||||
if m and m.group(1) and m.group(2):
|
if m and m.group(1) and m.group(2) and m.group(3):
|
||||||
bugs.append((m.group(1), m.group(2)))
|
bugs.append((m.group(1), m.group(2), m.group(3)))
|
||||||
else:
|
else:
|
||||||
|
# Assume summary line references are still rhbz# only
|
||||||
m = re.match(r"^.*#(\d+).*", line)
|
m = re.match(r"^.*#(\d+).*", line)
|
||||||
if m and m.group(1) and int(m.group(1)) > 100000:
|
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
|
return bugs
|
||||||
|
|
||||||
@ -99,8 +100,8 @@ class ChangeLog:
|
|||||||
author = self._getCommitDetail(commit, "%aE")
|
author = self._getCommitDetail(commit, "%aE")
|
||||||
|
|
||||||
msg = ["%s (%s)" % (summary.strip(), author)]
|
msg = ["%s (%s)" % (summary.strip(), author)]
|
||||||
for r, bz in self.getBugs(long):
|
for r, kind, bz in self.getBugs(long):
|
||||||
msg.append("%s: rhbz#%s" % (r, bz))
|
msg.append("%s: %s%s" % (r, kind, bz))
|
||||||
log.append(msg)
|
log.append(msg)
|
||||||
|
|
||||||
return log
|
return log
|
||||||
|
Loading…
Reference in New Issue
Block a user