Skip to content

Commit

Permalink
Update release creation script (lensapp#5617)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nokel81 authored Jun 13, 2022
1 parent 0dfd03e commit dc1f1ab
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions scripts/clear-release-pr.mjs → scripts/create-release-pr.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ const relaventPrsQuery = await Promise.all(
);
const relaventPrs = relaventPrsQuery
.filter(query => query.stdout)
.map(query => query.pr);
.map(query => query.pr)
.filter(pr => pr.labels.every(label => label.name !== "skip-changelog"));

const enhancementPrLabelName = "enhancement";
const bugfixPrLabelName = "bug";
Expand All @@ -152,11 +153,15 @@ const prBodyLines = [
"",
];

function getPrEntry(pr) {
return `- ${pr.title} (**[#${pr.number}](https://github.com/lensapp/lens/pull/${pr.number})**) https://github.com/${pr.author.login}`;
}

if (enhancementPrs.length > 0) {
prBodyLines.push(
"## 🚀 Features",
"",
...enhancementPrs.map(pr => `- ${pr.title} (**#${pr.number}**) https://github.com/${pr.author.login}`),
...enhancementPrs.map(getPrEntry),
"",
);
}
Expand All @@ -165,7 +170,7 @@ if (bugfixPrs.length > 0) {
prBodyLines.push(
"## 🐛 Bug Fixes",
"",
...bugfixPrs.map(pr => `- ${pr.title} (**#${pr.number}**) https://github.com/${pr.author.login}`),
...bugfixPrs.map(getPrEntry),
"",
);
}
Expand All @@ -174,7 +179,7 @@ if (maintenencePrs.length > 0) {
prBodyLines.push(
"## 🧰 Maintenance",
"",
...maintenencePrs.map(pr => `- ${pr.title} (**#${pr.number}**) https://github.com/${pr.author.login}`),
...maintenencePrs.map(getPrEntry),
"",
);
}
Expand Down

0 comments on commit dc1f1ab

Please sign in to comment.