Skip to content

Commit

Permalink
fix(ruby-yoshi): Remove bolded scope from changelog lines
Browse files Browse the repository at this point in the history
fix(ruby-yoshi): Fix link removal regex to handle additional cases
  • Loading branch information
dazuma committed Apr 13, 2022
1 parent 0c68c25 commit dfd6a18
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/strategies/ruby-yoshi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dfd6a18

Please sign in to comment.