From ef010d295447f9be7dfcb2f34509f3a8f2c7888c Mon Sep 17 00:00:00 2001 From: Zero King Date: Tue, 10 Oct 2017 04:19:26 +0000 Subject: [PATCH] Find CVE Identifiers in PR title too --- pr/webhook/pull_request.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pr/webhook/pull_request.go b/pr/webhook/pull_request.go index c61c346..48bb489 100644 --- a/pr/webhook/pull_request.go +++ b/pr/webhook/pull_request.go @@ -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"}