Skip to content

Commit b1eed94

Browse files
authored
chore: fix release issue (#447)
1 parent be7400b commit b1eed94

File tree

2 files changed

+47
-26
lines changed

2 files changed

+47
-26
lines changed

scripts/release/__tests__/create-release-issue.test.ts

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -265,22 +265,37 @@ describe('create release issue', () => {
265265

266266
expect(
267267
getSkippedCommitsText({
268-
commitsWithoutLanguageScope: ['abcdefg fix: something'],
269-
commitsWithUnknownLanguageScope: ['abcdef2 fix(pascal): what'],
268+
commitsWithoutLanguageScope: [
269+
'abcdefg fix: something',
270+
'abcdefg fix: somethin2',
271+
],
272+
273+
commitsWithUnknownLanguageScope: [
274+
'abcdef2 fix(pascal): what',
275+
'abcdef2 fix(pascal): what is that',
276+
],
270277
})
271278
).toMatchInlineSnapshot(`
272-
"<p></p>
273-
<p>It doesn't mean these commits are being excluded from the release. It means they're not taken into account when the release process figured out the next version number, and updated the changelog.</p>
279+
"</p>
280+
<p>It doesn't mean these commits are being excluded from the release. It means they're not taken into account when the release process figured out the next version number, and updated the changelog.</p>
281+
282+
<details>
283+
<summary>
284+
<i>Commits without language scope:</i>
285+
</summary>
286+
287+
- abcdefg fix: something
288+
- abcdefg fix: somethin2
289+
</details>
274290
275-
<p>Commits without language scope:</p>
276-
<ul>
277-
<li>abcdefg fix: something</li>
278-
</ul>
291+
<details>
292+
<summary>
293+
<i>Commits with unknown language scope:</i>
294+
</summary>
279295
280-
<p>Commits with unknown language scope:</p>
281-
<ul>
282-
<li>abcdef2 fix(pascal): what</li>
283-
</ul>"
296+
- abcdef2 fix(pascal): what
297+
- abcdef2 fix(pascal): what is that
298+
</details>"
284299
`);
285300
});
286301
});

scripts/release/create-release-issue.ts

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -73,18 +73,24 @@ export function getSkippedCommitsText({
7373
return '_(None)_';
7474
}
7575

76-
return `<p></p>
77-
<p>${TEXT.skippedCommitsDesc}</p>
78-
79-
<p>Commits without language scope:</p>
80-
<ul>
81-
${commitsWithoutLanguageScope.map((commit) => `<li>${commit}</li>`)}
82-
</ul>
83-
84-
<p>Commits with unknown language scope:</p>
85-
<ul>
86-
${commitsWithUnknownLanguageScope.map((commit) => `<li>${commit}</li>`)}
87-
</ul>`;
76+
return `</p>
77+
<p>${TEXT.skippedCommitsDesc}</p>
78+
79+
<details>
80+
<summary>
81+
<i>Commits without language scope:</i>
82+
</summary>
83+
84+
${commitsWithoutLanguageScope.map((commit) => `- ${commit}`).join('\n')}
85+
</details>
86+
87+
<details>
88+
<summary>
89+
<i>Commits with unknown language scope:</i>
90+
</summary>
91+
92+
${commitsWithUnknownLanguageScope.map((commit) => `- ${commit}`).join('\n')}
93+
</details>`;
8894
}
8995

9096
export function parseCommit(commit: string): Commit {
@@ -278,13 +284,13 @@ async function createReleaseIssue(): Promise<void> {
278284
TEXT.header,
279285
TEXT.versionChangeHeader,
280286
versionChanges,
281-
TEXT.skippedCommitsHeader,
282-
skippedCommits,
283287
TEXT.descriptionVersionChanges,
284288
TEXT.indenpendentVersioning,
285289
TEXT.changelogHeader,
286290
TEXT.changelogDescription,
287291
changelogs,
292+
TEXT.skippedCommitsHeader,
293+
skippedCommits,
288294
TEXT.approvalHeader,
289295
TEXT.approval,
290296
].join('\n\n');

0 commit comments

Comments
 (0)