Skip to content

Commit 57eb441

Browse files
committed
Add constant for unreleased placeholder
1 parent 5901394 commit 57eb441

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

pr-checks/changelog.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@ import * as fs from "node:fs";
22

33
import { CHANGELOG_FILE, DryRunOption } from "./config";
44

5+
/** The placeholder in the header for unreleased changes. */
6+
export const UNRELEASED_PLACEHOLDER = "[UNRELEASED]";
7+
58
/** The default contents for a section in the changelog. */
69
export const NO_CHANGES_STR = "No user facing changes.\n\n";
710

811
/** Placeholder changelog content for a new release. */
912
export const EMPTY_CHANGELOG = `# CodeQL Action Changelog
1013
11-
## [UNRELEASED]
14+
## ${UNRELEASED_PLACEHOLDER}
1215
1316
${NO_CHANGES_STR}`;
1417

@@ -54,7 +57,7 @@ export function setVersionAndDate(
5457
date: Date = new Date(),
5558
): string {
5659
const versionAndDate = `${version} - ${getReleaseDateString(date)}`;
57-
return content.replace("[UNRELEASED]", versionAndDate);
60+
return content.replace(UNRELEASED_PLACEHOLDER, versionAndDate);
5861
}
5962

6063
/**

0 commit comments

Comments
 (0)