Skip to content

Commit

Permalink
tools: remove "enhancement:" prefix from titles in report output
Browse files Browse the repository at this point in the history
Signed-off-by: Doug Hellmann <[email protected]>
  • Loading branch information
dhellmann committed Oct 9, 2020
1 parent 993c140 commit 5ccb897
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tools/report/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,20 @@ func showPRs(name string, prds []*stats.PullRequestDetails, withDescription bool
groupPrefix = ""
}

// Sometimes we have a superfluous "enhancement:" prefix in
// the PR title
title := *prd.Pull.Title
if strings.HasPrefix(strings.ToLower(title), "enhancement:") {
title = strings.TrimLeft(title[12:], " ")
}

fmt.Printf("- [%d](%s): (%d/%d) %s%s (%s)\n",
*prd.Pull.Number,
*prd.Pull.HTMLURL,
prd.RecentActivityCount,
prd.AllActivityCount,
groupPrefix,
*prd.Pull.Title,
title,
author,
)
if withDescription {
Expand Down

0 comments on commit 5ccb897

Please sign in to comment.