Skip to content

Commit e8e3549

Browse files
CoderrobCopilot
andauthored
Update src/core/storage/task.manager.ts
Co-authored-by: Copilot <[email protected]>
1 parent 8347839 commit e8e3549

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/core/storage/task.manager.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,10 @@ export class TaskManager implements ITaskStore, IChangelogStore {
167167
entry: string,
168168
): void {
169169
const afterUnreleasedIndex = content.indexOf('\n', unreleasedIndex);
170-
if (afterUnreleasedIndex === -1) return;
170+
if (afterUnreleasedIndex === -1) {
171+
this.logger.warn('Could not append entry to CHANGELOG.md: no newline found after "Unreleased" section.', { entry });
172+
return;
173+
}
171174

172175
const insertPos = afterUnreleasedIndex + 1;
173176
const newContent = `${content.slice(0, insertPos)}- ${entry}\n${content.slice(insertPos)}`;

0 commit comments

Comments
 (0)