add-bang-notes.js 318 B

1234567891011
  1. const { breakingHeaderPattern } = require('./parser-opts')()
  2. module.exports = (commit) => {
  3. const match = commit.header.match(breakingHeaderPattern)
  4. if (match && commit.notes.length === 0) {
  5. const noteText = match[3] // the description of the change.
  6. commit.notes.push({
  7. text: noteText
  8. })
  9. }
  10. }