From dfd6a188727e1c3a99dcf539a5a052b7ee75b390 Mon Sep 17 00:00:00 2001 From: Daniel Azuma Date: Wed, 13 Apr 2022 18:39:24 +0000 Subject: [PATCH] fix(ruby-yoshi): Remove bolded scope from changelog lines fix(ruby-yoshi): Fix link removal regex to handle additional cases --- src/strategies/ruby-yoshi.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/strategies/ruby-yoshi.ts b/src/strategies/ruby-yoshi.ts index 285d7598e..2c9ed43c6 100644 --- a/src/strategies/ruby-yoshi.ts +++ b/src/strategies/ruby-yoshi.ts @@ -124,8 +124,13 @@ export class RubyYoshi extends BaseStrategy { releaseNotes // Remove links in version title line and standardize on h3 .replace(/^###? \[([\d.]+)\]\([^)]*\)/gm, '### $1') + // Remove bolded scope from change lines + .replace(/^\* \*\*[\w-]+:\*\* /gm, '* ') // Remove PR and commit links from pull request title suffixes - .replace(/ \(\[#\d+\]\([^)]*\)\)( \(\[\w+\]\([^)]*\)\))?\s*$/gm, '') + .replace( + /( \(\[(\w+|#\d+)\]\(https:\/\/github\.com\/[^)]*\)\))+\s*$/gm, + '' + ) // Standardize on h4 for change type subheaders .replace(/^### (Features|Bug Fixes|Documentation)$/gm, '#### $1') // Collapse 2 or more blank lines