marvinpinto / actions

A Collection of GitHub Actions
MIT License
132 stars 71 forks source link

automatic-releases not writing breaking changes properly #67

Closed AllanChain closed 3 years ago

AllanChain commented 3 years ago

It is the text after "BREAKING CHANGE" that should be listed in Breaking Changes section, not the commit message.

Message:

feat: Allow custom separator

BREAKING CHANGE: some breaking change.

Expected:

## Breaking Changes

- some breaking change.

## Features

- Allow custom separator

Got:

## Breaking Changes

- Allow custom separator

## Features

- Allow custom separator

Note: above example is not accurate, but can demonstrate the issue

Additional info

How about using notes field returned by conventional-commits-parser?

{ type: 'feat',
  scope: 'ng-list',
  subject: 'Allow custom separator',
  merge: null,
  header: 'feat(ng-list): Allow custom separator',
  body: 'bla bla bla',
  footer: 'BREAKING CHANGE: some breaking change.\nThanks @stevemao',
  notes:
   [ { title: 'BREAKING CHANGE',
       text: 'some breaking change.\nThanks @stevemao' } ],
  references: [],
  mentions: [ 'stevemao' ],
  revert: null }
marvinpinto commented 3 years ago

I believe the underlying parser this thing uses gets the breaking change "message" from the commit header itself. This might be a lot of work to change so I'm probably going to leave this be for now.

Thanks for the detailed bug report, really appreciate it :+1: