Skip to content

Commit

Permalink
Fixed Changelog Generation. Nothing could go wrong (#1364)
Browse files Browse the repository at this point in the history
Co-authored-by: Davide Ceschia <10165264+killpowa@users.noreply.github.com>
  • Loading branch information
Eskaan and blarfoon authored Jun 16, 2022
1 parent 4f7518a commit 74600a9
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions scripts/uploadRelease.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,16 @@ const main = async () => {
.toUpperCase()}${element.substring(1)}\n`;

for (const e of rawChangeLog[element]) {
if (!e?.advanced?.cm || !e?.header || !e?.content) {
continue;
}
const prSplit = e?.advanced?.pr && e?.advanced?.pr.split('/');
const advanced =
e?.advanced?.cm &&
` ([${e?.advanced?.cm}](https://github.com/gorilla-devs/GDLauncher/commit/${e?.advanced?.cm})` +
`${
prSplit
? ` | [#${e?.advanced.pr}](https://github.com/gorilla-devs/GDLauncher/pull/${prSplit[0]}` +
`${prSplit?.[1] ? `/commits/${prSplit[1]}` : ''})`
: ''
})`;
`${
prSplit
? ` | [#${e?.advanced.pr}](https://github.com/gorilla-devs/GDLauncher/pull/${prSplit[0]}` +
`${prSplit?.[1] ? `/commits/${prSplit[1]}` : ''})`
: ''
})`;
const notes = `- **${e?.header || ''}** ${e?.content || ''}`;
changeLog += `${notes + advanced} \n`;
}
Expand Down

0 comments on commit 74600a9

Please sign in to comment.