Skip to content

Commit

Permalink
feat: refactor for api changes
Browse files Browse the repository at this point in the history
  • Loading branch information
viceice committed Dec 3, 2024
1 parent f095a5f commit 236f1a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/changelog/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,16 @@ export const config = conventionalChangelogPreset({

/**
*
* @param {string} version
* @param {boolean} onTag
* @param {boolean|undefined} onTag
* @returns
*/
export function getChangelog(version, onTag) {
export function getChangelog(onTag = false) {
return conventionalChangelogCore(
{
config,
releaseCount: onTag ? 2 : 1,
},
{ version, linkCompare: false },
undefined,
undefined,
undefined,
{ headerPartial: '' },
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class GiteaReleaseCommand extends Command {
return 1;
}

const stream = getChangelog(tag, true).setEncoding('utf8');
const stream = getChangelog(true).setEncoding('utf8');
const changes = (await stream.toArray()).join('');

this.context.stdout.write(`Creating release ${tag}.\n`);
Expand Down

0 comments on commit 236f1a2

Please sign in to comment.