Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add a default value for useShortPrLink
  • Loading branch information
gauthierpetetin committed Sep 8, 2025
commit 93a67afab74b18565a20b55b4057a531d48c9384
10 changes: 5 additions & 5 deletions src/changelog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function stringifyCategory(
category: ChangeCategory,
changes: Change[],
repoUrl: string,
useShortPrLink: boolean,
useShortPrLink = false,
) {
const categoryHeader = `### ${category}`;
if (changes.length === 0) {
Expand Down Expand Up @@ -156,7 +156,7 @@ function stringifyRelease(
version: Version | typeof unreleased,
categories: ReleaseChanges,
repoUrl: string,
useShortPrLink: boolean,
useShortPrLink = false,
{ date, status }: Partial<ReleaseMetadata> = {},
) {
const releaseHeader = `## [${version}]${date ? ` - ${date}` : ''}${
Expand Down Expand Up @@ -188,7 +188,7 @@ function stringifyReleases(
releases: ReleaseMetadata[],
changes: ChangelogChanges,
repoUrl: string,
useShortPrLink: boolean,
useShortPrLink = false,
) {
const stringifiedUnreleased = stringifyRelease(
unreleased,
Expand Down Expand Up @@ -603,7 +603,7 @@ export default class Changelog {
* @param useShortPrLink - Whether to use short PR links in the changelog entries.
* @returns The stringified release, as it appears in the changelog.
*/
getStringifiedRelease(version: Version, useShortPrLink: boolean) {
getStringifiedRelease(version: Version, useShortPrLink = false) {
const release = this.getRelease(version);
if (!release) {
throw new Error(`Specified release version does not exist: '${version}'`);
Expand Down Expand Up @@ -643,7 +643,7 @@ export default class Changelog {
* @param useShortPrLink - Whether to use short PR links in the changelog entries.
* @returns The stringified changelog.
*/
async toString(useShortPrLink: boolean): Promise<string> {
async toString(useShortPrLink = false): Promise<string> {
const changelog = `${changelogTitle}
${changelogDescription}

Expand Down
Loading