Find CVE Identifiers in PR title too

This commit is contained in:
Zero King
2017-10-10 04:19:26 +00:00
parent cee95f2e60
commit ef010d2954
+1 -1
View File
@@ -163,7 +163,7 @@ func (receiver *Receiver) handlePullRequest(body []byte) {
if strings.Contains(strings.ToLower(*event.PullRequest.Title), ": update to") {
typeLabels = appendIfUnique(typeLabels, "type: update")
}
if cveRegexp.FindString(*event.PullRequest.Body) != "" {
if cveRegexp.FindString(*event.PullRequest.Title) != "" || cveRegexp.FindString(*event.PullRequest.Body) != "" {
typeLabels = appendIfUnique(typeLabels, "type: security fix")
}
typesFromBody := []string{"bugfix", "enhancement", "security fix"}