Skip to content

Commit 21b8b0b

Browse files
committed
plzzzz
1 parent 5add76b commit 21b8b0b

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

src/index.ts

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,11 @@ interface ChangesetWithPR extends NewChangesetWithCommit {
1313
// Keep track of all authors across changesets
1414
let allAuthors = new Set<string>();
1515
let patchChanges = new Set<string>();
16-
let hasAddedCredits = false; // Track if we've added credits in this changelog
1716

1817
// Reset function to be called at the start of each changelog generation
1918
function resetChangelogState() {
2019
allAuthors.clear();
2120
patchChanges.clear();
22-
hasAddedCredits = false;
2321
}
2422

2523
async function getReleaseLine(
@@ -65,6 +63,7 @@ async function getReleaseLine(
6563
repo,
6664
pull: prFromSummary,
6765
});
66+
console.log(`[Debug] Pull request info: ${user}`);
6867
if (user) {
6968
allAuthors.add(user);
7069
}
@@ -78,6 +77,7 @@ async function getReleaseLine(
7877
repo,
7978
commit: commitToFetchFrom,
8079
});
80+
console.log(`[Debug] Commit info: ${info.user}`);
8181
if (info.user) {
8282
allAuthors.add(info.user);
8383
}
@@ -140,6 +140,7 @@ async function getDependencyReleaseLine(
140140
repo,
141141
commit: cs.commit,
142142
});
143+
console.log(`[Debug] Commit info: ${user}`);
143144
if (user) {
144145
allAuthors.add(user);
145146
}
@@ -173,14 +174,6 @@ async function getDependencyReleaseLine(
173174

174175
// Function to get the credits section
175176
function getCreditsSection(): string {
176-
if (allAuthors.size === 0) {
177-
return "";
178-
}
179-
180-
if (hasAddedCredits) {
181-
return "";
182-
}
183-
184177
const authors = Array.from(allAuthors).sort();
185178
const authorLinks = authors.map((author) => `@${author}`);
186179

@@ -200,7 +193,6 @@ function getCreditsSection(): string {
200193
)}, and ${lastAuthor} for helping!`;
201194
}
202195

203-
hasAddedCredits = true;
204196
return credits;
205197
}
206198

@@ -229,7 +221,7 @@ const wrappedGetDependencyReleaseLine: ChangelogFunctions["getDependencyReleaseL
229221
);
230222

231223
// Add credits section if we have authors
232-
if (allAuthors.size > 0 && !hasAddedCredits) {
224+
if (allAuthors.size > 0) {
233225
const credits = getCreditsSection();
234226
// Reset state after adding credits
235227
resetChangelogState();

0 commit comments

Comments
 (0)