How To Make Conventional Changelog Analyze Merge Commits

This took me 4 hours of life!

Omri Bar-Zik
Outbrain Engineering
Oct 25, 2023

--

To make conventional changelog analyze merge commits you will need to create a config file with this config:

// config.js

'use strict';

const config = {
// ... other configs
gitRawCommitsOpts: {
merges: undefined,
noMerges: undefined,
},
};

module.exports = config;

The gitRawCommitsOpts object is used by Conventional Changelog to build the git commands that analyze your git log.

and for some reason, you have to specify both merges and noMerges to be undefined unless it doesn't work

after you create your config, you can tell Conventional Changelog to use it by adding the --config flag like so:

npx conventional-changelog-cli@latest --config config.js

And that is it! Hope you don’t have to burn hours of your life reading conventional changelog source code 😄

--

--