Skip to content

Commit

Permalink
Fix merge-release-notes.js
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Telatynski <[email protected]>
  • Loading branch information
t3chguy committed Feb 2, 2024
1 parent 5e9d2e0 commit b8fb10a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/release/merge-release-notes.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ async function getReleases(github, dependency) {
repo,
per_page: 100,
});
const releases = response.data.filter((release) => !release.draft && !release.prerelease);
// Only include non-draft & non-prerelease releases, unless the to-release is a pre-release, include that one
const releases = response.data.filter(
(release) => !release.draft && (!release.prerelease || release.tag_name === `v${toVersion}`),
);

const fromVersionIndex = releases.findIndex((release) => release.tag_name === `v${fromVersion}`);
const toVersionIndex = releases.findIndex((release) => release.tag_name === `v${toVersion}`);
Expand Down Expand Up @@ -83,8 +86,6 @@ const main = async ({ github, releaseId, dependencies }) => {
const { GITHUB_REPOSITORY } = process.env;
const [owner, repo] = GITHUB_REPOSITORY.split("/");

console.log("@@", { releaseId, dependencies, owner, repo });

const sections = Object.fromEntries(categories.map((cat) => [cat, []]));
for (const dependency of dependencies) {
const releases = await getReleases(github, dependency);
Expand Down

0 comments on commit b8fb10a

Please sign in to comment.