Skip to content

Commit

Permalink
add link to full release notes to the end of `changelogsByComponentMa…
Browse files Browse the repository at this point in the history
…rkdown`
  • Loading branch information
gr2m committed Jul 7, 2023
1 parent fb20d41 commit 04968b5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions main.js
Expand Up @@ -51,16 +51,20 @@ export function main(core, event) {
);
core.setOutput(
"changelogsByComponentMarkdown",
yamlEscape(toMarkdown(changelogsByComponent))
yamlEscape(toMarkdown(changelogsByComponent, event))
);
}

function toMarkdown(changelogsByComponent) {
function toMarkdown(changelogsByComponent, event) {
return Object.entries(changelogsByComponent)
.map(([component, changelogs]) => {
return `### ${component}
- ${changelogs.join("\n- ")}`;
- ${changelogs.join("\n- ")}
---
Full release notes: ${event.client_payload.release.html_url}`;
})
.join("\n\n");
}
Expand Down

0 comments on commit 04968b5

Please sign in to comment.