Skip to content

Commit

Permalink
fix: do not include changelogs for components the user did not subscr…
Browse files Browse the repository at this point in the history
…ibe to
  • Loading branch information
gr2m committed Aug 4, 2023
1 parent 8ae00a9 commit 076e2d6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.js
Expand Up @@ -12,6 +12,7 @@ export function main(core, event) {
const [ignore_, ...changelogs] = body.split(/^- /gm);

const changelogsByComponent = {};
const subscribedToComponents = process.env.INPUT_COMPONENTS.split(/\s*,\s*/);

for (const changelog of changelogs) {
const lines = changelog.split(/\n\s*/).filter(Boolean);
Expand All @@ -35,6 +36,8 @@ export function main(core, event) {
}

for (const component of components) {
if (!subscribedToComponents.includes(component)) continue;

changelogsByComponent[component] = changelogsByComponent[component] || [];
changelogsByComponent[component].push(lines.join("\n"));
}
Expand Down

0 comments on commit 076e2d6

Please sign in to comment.