mirror of
https://github.com/github/codeql-action.git
synced 2026-10-03 17:41:28 +00:00
Rename name to absolutePath for clarity
This commit is contained in:
@@ -21,7 +21,7 @@ import { CHANGENOTES_DIR } from "./config";
|
|||||||
* Describes a changenote file, including its file path, frontmatter, and content.
|
* Describes a changenote file, including its file path, frontmatter, and content.
|
||||||
*/
|
*/
|
||||||
interface ChangenoteFile {
|
interface ChangenoteFile {
|
||||||
name: string;
|
absolutePath: string;
|
||||||
data: Record<string, any>;
|
data: Record<string, any>;
|
||||||
content: string;
|
content: string;
|
||||||
}
|
}
|
||||||
@@ -42,10 +42,10 @@ function listUnreleasedChangenoteDir(): string[] {
|
|||||||
* and returns a parsed listing of those changenote files.
|
* and returns a parsed listing of those changenote files.
|
||||||
*/
|
*/
|
||||||
function getChangenotes(): ChangenoteFile[] {
|
function getChangenotes(): ChangenoteFile[] {
|
||||||
return listUnreleasedChangenoteDir().map((name) => {
|
return listUnreleasedChangenoteDir().map((absolutePath) => {
|
||||||
return {
|
return {
|
||||||
name,
|
absolutePath,
|
||||||
...matter(fs.readFileSync(name, "utf-8")),
|
...matter(fs.readFileSync(absolutePath, "utf-8")),
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -93,7 +93,7 @@ function assemble(): ExitCode {
|
|||||||
try {
|
try {
|
||||||
const changenotes = getChangenotes();
|
const changenotes = getChangenotes();
|
||||||
const changenoteBodies = changenotes.map((c) => c.content);
|
const changenoteBodies = changenotes.map((c) => c.content);
|
||||||
const changenotePaths = changenotes.map((c) => c.name);
|
const changenotePaths = changenotes.map((c) => c.absolutePath);
|
||||||
|
|
||||||
withChangelog((contents) => {
|
withChangelog((contents) => {
|
||||||
const changelog = parseChangelog(contents);
|
const changelog = parseChangelog(contents);
|
||||||
|
|||||||
Reference in New Issue
Block a user