Skip to content

Commit

Permalink
chore: update mergeReleaseChangelog.mjs no10 [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
ilhan007 authored Nov 3, 2024
1 parent c3335c8 commit b836889
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/actions/mergeReleaseChangelog.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ const mergeReleaseChangelogs = (releases) => {

const updateRelease = async (releaseContext) => {
const releaseId = releaseContext.minorRelease.id;
const releaseHeaderMatch = releaseContext.minorRelease.body.match(/^#\s\[.*?\]\(.*?\)\s\([\d-]+\)/);
const releaseHeader = releaseHeaderMatch ? `${releaseHeaderMatch[0]}\n\n` : '';
const formattedFixes = releaseContext.fixes.length ? `### Fixes\n- ${releaseContext.fixes.join('\n- ')}` : '';
const formattedFeatures = releaseContext.features.length ? `### Features\n- ${releaseContext.features.join('\n- ')}` : '';
const body = `${formattedFixes}\n\n${formattedFeatures}`.trim();
const body = `${releaseHeader}${formattedFixes}\n\n${formattedFeatures}`.trim();

try {
await releaseContext.github.request('PATCH /repos/{owner}/{repo}/releases/{releaseId}', {
Expand Down

0 comments on commit b836889

Please sign in to comment.