⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.
TypeScript honoissue-managementissue-trackerjira-alternativekanbanlinear-alternativemcpproject-managementreactself-hostedtypescript
refactor(planka-import): drop the dead author parameter from formatComment
Andrej05ca31b02ba1
diff --git a/packages/planka-import/src/mapping.test.ts b/packages/planka-import/src/mapping.test.tsindex b3bda65ab..88fa96e36 100644--- a/packages/planka-import/src/mapping.test.ts+++ b/packages/planka-import/src/mapping.test.ts@@ -139,31 +139,25 @@ describe("buildDescription", () => {describe("formatComment", () => {it("keeps the body clean and notes the original date", () => {- const result = formatComment(- {- id: "c1",- cardId: "a",- userId: "u1",- text: "Looks good",- createdAt: "2026-03-04T10:00:00.000Z",- },- { id: "u1", email: "[email protected]", name: "Sam", username: null },- );+ const result = formatComment({+ id: "c1",+ cardId: "a",+ userId: "u1",+ text: "Looks good",+ createdAt: "2026-03-04T10:00:00.000Z",+ });expect(result).toBe("Looks good\n\n_Originally posted on 2026-03-04._");});it("returns the text unchanged when there is no date", () => {- const result = formatComment(- {- id: "c1",- cardId: "a",- userId: null,- text: "Orphaned",- createdAt: null,- },- undefined,- );+ const result = formatComment({+ id: "c1",+ cardId: "a",+ userId: null,+ text: "Orphaned",+ createdAt: null,+ });expect(result).toBe("Orphaned");});diff --git a/packages/planka-import/src/mapping.ts b/packages/planka-import/src/mapping.tsindex 2a3824ece..753436fe4 100644--- a/packages/planka-import/src/mapping.ts+++ b/packages/planka-import/src/mapping.ts@@ -93,10 +93,7 @@ export function displayName(user: PlankaUser | undefined): string {);}-export function formatComment(- comment: PlankaComment,- _author: PlankaUser | undefined,-): string {+export function formatComment(comment: PlankaComment): string {const date = comment.createdAt? new Date(comment.createdAt).toISOString().slice(0, 10): null;diff --git a/packages/planka-import/src/migrate.ts b/packages/planka-import/src/migrate.tsindex 9dea643b9..05f273513 100644--- a/packages/planka-import/src/migrate.ts+++ b/packages/planka-import/src/migrate.ts@@ -325,7 +325,7 @@ async function migrateBoard(context: {const author = comment.userId ? usersById.get(comment.userId) : undefined;await kaneo.createComment(task.id,- formatComment(comment, author),+ formatComment(comment),displayName(author),);report.comments++;