sync: Backfill history entries for merged PRs #29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "idea-3-history-backfill"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
UNIQUE(project_id, pr_number)constraint tohistory_entriesso both webhooks and sync are idempotentListMergedPRsWithoutHistoryquery finds gaps;BackfillHistorysyncer method fills them at startup and every 15 minutesCloses idea #3
Test plan
TestCreateHistoryEntryIdempotent— duplicate insert returns (nil, nil), no error, one rowTestListMergedPRsWithoutHistory— merged without history returned, merged with history excluded, open excludedTestBackfillHistory— end-to-end: sync merged PR, backfill creates entry, second run is idempotentgo test ./...)🤖 Generated with Claude Code