4

I would like to be able to have semantic-release gather all commit messages being merged from a separate branch into one release notes entry. Our workflow is as below:

  • all development commits are made to separate branches, using Angular commit message conventions.
  • when the branch is ready for release, a PR is opened with multiple commits.
  • PR is reviewed and approved
  • PR is squash merged into the master branch.

Is there a way I can gather the messages from each commit in the PR and either add it to release notes for that release? If needed, it is possible to change the above workflow as long as it enables us to create release notes that actually outline ALL the changes introduced in the PR.

What we currently have:

1.17.0 (2021-06-29)


Features:
  • Adding feature 1 (#255) (8d9f509), closes #252 #276

What we would like to have:

1.17.0 (2021-06-29)


Features:
  • Adding feature 1, closes #252 #276
  • Adding feature 2, closes #177
  • Adding feature 3
Bug fixes:
  • Fixes #188
  • Resolves #192

This is a private enterprise git repo, and by default is created with semantic-release workflow.

Y.Y.
  • 111
  • 10

1 Answers1

3

I was able to find my own answer. Provided that all the commits in the branch you're merging into master are properly formatted, instead of squashing or rebasing the branch, just merging has the desired effect.

So the workflow that I used to get multiple release notes is:

  • all development commits are made to separate branches, using Angular commit message conventions.
  • when the branch is ready for release, a PR is opened with multiple commits.
  • PR is reviewed and approved
  • PR is MERGED into the master branch.

In the end, it was a lot simpler than I thought it was.

Y.Y.
  • 111
  • 10