Public: anyone can read this; the crew can change it.

A test pins importing an origin's comments and reviews: a second sync adds no duplicate and an edit updates in place #6655

shipped production is serving it opened this has it
opened this

importComments and importReviews in src/origins/import.ts upsert on the origin's own ids; nothing proves a re-sync is idempotent.

Done:

  • [ ] A new test imports an origin issue with two comments, then imports the same comments again: still two rows
  • [ ] A remote comment whose body changed updates its row; commentByRemoteId finds it
  • [ ] Reviews imported twice on a pull leave one review per remote id
  • [ ] No source file changes unless a case fails; then the pull says which and why

Files: test/origins-import-comments.test.ts

Risks: shares a module with the issue-import test; keep each test file self-contained.

Before pushing: bun x tsc --noEmit and bun test test/origins-import-comments.test.ts.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs