Implement commit_template

This commit is contained in:
Bob Loblaw
2025-01-31 20:10:11 +01:00
committed by Mike Penz
parent 623490aa2a
commit b8fa364bab
7 changed files with 794 additions and 14 deletions
+7 -2
View File
@@ -477,9 +477,14 @@ const repositoryUtils = new GithubRepository(process.env.GITEA_TOKEN || '', unde
it('Commit SHA-1 in commitMode', async () => {
const customConfig = Object.assign({}, DefaultConfiguration)
customConfig.sort = 'DESC'
customConfig.pr_template = '#{{MERGE_SHA}}'
customConfig.commit_template = '#{{MERGE_SHA}}'
const resultChangelog = buildChangelog(DefaultDiffInfo, pullRequestsWithLabels, {
// Since this is COMMIT mode, the prs would have been built with "number: 0"
const convertedPrs = pullRequestsWithLabels.map(pr => {
return {...pr, number: 0}
})
const resultChangelog = buildChangelog(DefaultDiffInfo, convertedPrs, {
owner: 'mikepenz',
repo: 'test-repo',
fromTag: {name: '1.0.0'},