From a6e284e0fbf42c37e832142c10bef41313864d64 Mon Sep 17 00:00:00 2001 From: Robin Lambertz Date: Wed, 6 Nov 2024 15:07:11 +0100 Subject: [PATCH] Fix repo reuse --- generate_changelog.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/generate_changelog.js b/generate_changelog.js index bd90f1b..b0e9df1 100644 --- a/generate_changelog.js +++ b/generate_changelog.js @@ -4,7 +4,7 @@ const path = require("path"); const { stderr } = require("process"); async function main() { - const repo = process.argv[2]; + const repoName = process.argv[2]; const commitFrom = process.argv[3]; const commitTo = process.argv[4]; @@ -66,7 +66,7 @@ async function main() { var generatedMarkdown = "# Changelog\n\n"; - generatedMarkdown += `Commit range: [${commitFrom}..${commitTo}](https://github.com/${repo}/compare/${commitFrom}...${commitTo})\n\n`; + generatedMarkdown += `Commit range: [${commitFrom}..${commitTo}](https://github.com/${repoName}/compare/${commitFrom}...${commitTo})\n\n`; for (let change of graph) { if (change.type == "merge") { @@ -90,7 +90,7 @@ async function main() { function formatCommit(change, isChild) { let replaceWithSpaces = isChild ? "\n " : "\n "; - const linkSha = `[${change.sha.slice(0, 8)}](https://github.com/${repo}/commit/${change.sha})` + const linkSha = `[${change.sha.slice(0, 8)}](https://github.com/${repoName}/commit/${change.sha})` return "- " + linkSha + " " + change.message.trim().split("\n").join(replaceWithSpaces) + "\n"; }