return ret
+ def _get_orabug(self, commit):
+ proc = subprocess.Popen(['git', 'log', '-1',
+ "--pretty=format:%b", commit],
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE).communicate()
+
+ ret = proc[0].strip('\n').split('\n')
+ if len(ret[0]) > 0 and len(ret[0]) > 7 and ret[0].find("Orabug") != -1:
+ return "[%s]" % ret[0]
+ else:
+ return ""
+
+ def _get_cve(self, commit):
+ proc = subprocess.Popen(['git', 'log', '-1',
+ "--pretty=format:%b", commit],
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE).communicate()
+
+ cves = []
+ m = re.search("CVE-[0-9]+-[0-9]+", proc[0], re.MULTILINE)
+ if m:
+ cves.append(m.group())
+ ret = ""
+ if len(cves) > 0:
+ for cve in cves:
+ ret += "%s " % cve
+ return ret
+
def getLog(self):
range = "%s.." % (self.tag)
proc = subprocess.Popen(['git', 'log', '--pretty=oneline', range],
summary = self._getCommitDetail(commit, "%s")
long = self._getCommitDetail(commit, "%b")
author = self._getCommitDetail(commit, "%aN")
+ orabug = self._get_orabug(commit)
+ cve = self._get_cve(commit)
- log.append(("%s (%s)" % (summary.strip(), author)))
+ log.append(("%s (%s) %s %s" % (summary.strip(), author, orabug, cve)))
return log