mikepenz/release-changelog-builder-action

Question: does it reads only PR titles or also commit text?

FrancescoBonizzi opened this issue ยท 1 comments

Hi! I didn't understand if this action reads only PR titles or also commit text? Consider the scenario where I work alone and I don't make PR to my main branch, but just push everything directly.

Thanks.

You can benefit the most when having PRs for this action. Given PRs offer labels and more.

That being said. There is a commitMode (please find it int he README) - which will use the commits instead.
Please be aware that various features won't be available for the commit mode, as that information will not be available for commits.

There's for example a test case using emojis to categorize commits instead:

it('Verify commit based changelog, with emoji categorisation', async () => {
const configuration = mergeConfiguration(undefined, resolveConfiguration('', 'configs_test/configuration_commits_emoji.json'))
const releaseNotesBuilder = new ReleaseNotesBuilder(
null,
null,
'.',
'theapache64',
'stackzy',
'bd3242a6b6eadb24744c478e112c4628e89609c2',
'17a9e4dfaedcabe6a6eff2754bebb715e1c58ec4',
false,
false,
false,
false, // enable to fetch reviewers
false, // enable to fetch tag release information
false, // enable to fetch reviews
true,
configuration
)
const changeLog = await releaseNotesBuilder.build()
console.log(changeLog)
expect(changeLog).toStrictEqual(
`## ๐Ÿš€ Features\n\n- add dynamic merging\n- add auto-cleaning\n- add built-in adb support\n- add adb fallback (thanks to @mikepenz ;))\n- add install note\n- add @mikepenz to credits\n\n## ๐Ÿ› Fixes\n\n- fix dynamic lib replacement\n- fix apostrophe issue with app name\n- fix java.util.logger error\n\n## ๐Ÿ’ฌ Other\n\n- update screenshot with truecaller stack\n\n`
)
})

(using a label extractor to get a label based on the commit:
"label_extractor": [
{
"pattern": "(.) (.+)",
"target": "$1"
}
],
)