Commits with description/body content are being left out
Opened this issue · 4 comments
It is entirely possible I'm missing something obvious in the documentation but I'm facing an issue fairly detrimental to how myself and my team write commits.
A typical commit being added to the changelog via auto-changelog consists of: 🔨 Update functionality for feature
However I noticed when commits were tied to a story ID, or had extra description, they are not included in the automated updates and are left out entirely:
🔨 Update functionality for feature
PID-123
or
🔨 Update functionality for feature
Due to change in requirements, needed
to change how thing is handled
Both of those examples are not included in the changelog created by auto-changelog. They exist in the Git history locally and on the remote, so they do exist, but auto-changelog seems to be skipping over any commit that is not only a subject line.
Am I, like I mentioned, missing or misusing an option or template? Both can be found below:
For extra context here is the point where I noticed this occuring:
In GitHub, and locally, this was the history I expected to see (minus release commits of course):
After running auto-changelog, the changelog created was this:
The "Add new styles" commit, which has description area content (where I store my story links), is left out of the generated log.
EDIT: Running npx auto-changelog
does show the full list of commits (including release and merge commits) so I'm guessing it has to do with my template, but it's mostly a variation of the example template from the docs. I originally assumed maybe commits missing from the message
regex were being left out, but that doesn't seem to be true either (as two commits missing have "Add" in them.
Merge commits and commits that fix an issue are grouped into separate lists (merges
and fixes
) which is why they don’t appear in commits
.
I guess in your case you need a flag that doesn’t do any clever grouping of commits based on the content, so they all appear in the commits
array and can be filtered by your handlebars template.
@geebru Hi, have you figured out the issue "commits with description/body content are being left out "?
I experience the same issue.
The command I use:
auto-changelog --output CHANGELOG.md --commit-limit false --template keepachangelog --ignore-commit-pattern '.*\[skip ci\].*'
For the commit, I expect to have both commit title and body message, like
Author: Jiyang Ye <yejiyang@gmail.com>
Date: Sat Dec 9 14:02:40 2023 +0100
This commit has both title and message
Dummy message. xxxx
The result I got missed the body message,
Commits
This commit has both title and message b0bedf8
Any chance we could have an option to include the commit body in the changelog? I use it to describe breaking changes and how users can migrate. Would be useful to have in the changelog