Skip to content

Commit 6375daa

Browse files
committed
chore: get credits working
1 parent 99fb581 commit 6375daa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ const wrappedGetReleaseLine: ChangelogFunctions["getReleaseLine"] = async (
224224
opts
225225
) => {
226226
const result = await getReleaseLine(changeset as ChangesetWithPR, type, opts);
227-
// Only add credits section if this is the last changeset
228-
if (opts?.isLast) {
227+
// Add credits section only if this is the last changeset and we have authors
228+
if (opts?.isLast && allAuthors.size > 0) {
229229
return result + getCreditsSection();
230230
}
231231
return result;
@@ -238,8 +238,8 @@ const wrappedGetDependencyReleaseLine: ChangelogFunctions["getDependencyReleaseL
238238
dependencies,
239239
opts
240240
);
241-
// Only add credits section if this is the last entry and there are no regular changesets
242-
if (opts?.isLast && changesets.length === 0) {
241+
// Add credits section only if this is the last entry, there are no regular changesets, and we have authors
242+
if (opts?.isLast && changesets.length === 0 && allAuthors.size > 0) {
243243
return result + getCreditsSection();
244244
}
245245
return result;

0 commit comments

Comments
 (0)