add header to release pr. remove 📦️ Dependencies from release description (#3144)

This commit is contained in:
Viktor Scharf
2026-07-17 08:07:28 +02:00
committed by GitHub
parent e13b86950a
commit a82aeef2eb
2 changed files with 33 additions and 0 deletions

View File

@@ -15,6 +15,7 @@ exclude_paths:
- 'idp/src/**'
- 'devtools/**'
- 'deployments/**'
- "release-config.ts"
- 'tests/acceptance/expected-failures-*.md'
- 'tests/acceptance/bootstrap/**'
- 'tests/acceptance/TestHelpers/**'

View File

@@ -73,6 +73,38 @@ export default {
const latestTag = tags.pop() || "v0.0.0";
return compareVersions(latestTag, nextVersion) === -1;
},
getReleaseDescription: async ({ nextVersion }) => {
const note =
"> [!IMPORTANT]\n" +
"> This is a rolling release. Learn here about the [release types and lifecycle](https://docs.opencloud.eu/docs/admin/resources/lifecycle#release-types).\n\n";
// Exclude the "📦️ Dependencies" section from the release description
const section = removeChangelogSubsection(
await getChangelogSection(nextVersion),
"📦️ Dependencies"
);
return `${note}${section}`;
},
};
// helper functions
const getChangelogSection = async (nextVersion: string) => {
const { promises: fs } = await import("fs");
const changelog = await fs.readFile("CHANGELOG.md", "utf-8").catch(() => "");
const section = changelog
.split(/\n(?=## \[)/)
.find((s) => s.startsWith(`## [${nextVersion}]`));
return section?.trim() ?? "";
};
const removeChangelogSubsection = (section: string, heading: string) => {
return section
.split(/\n(?=### )/)
.filter((s) => !s.startsWith(`### ${heading}`))
.join("\n")
.trim();
};
const parseVersion = (tag: string) => {