Skip to content

fix(github): deduplicate imported comments by URL - #1585

Open
cyphercodes wants to merge 1 commit into
git-bug:trunkfrom
cyphercodes:fix-github-comment-dedupe-1582
Open

fix(github): deduplicate imported comments by URL#1585
cyphercodes wants to merge 1 commit into
git-bug:trunkfrom
cyphercodes:fix-github-comment-dedupe-1582

Conversation

@cyphercodes

Copy link
Copy Markdown

Summary

Fixes #1582.

  • fall back to the stored GitHub comment URL when an imported comment's node ID is not found in local bridge metadata
  • skip creating a new git-bug comment operation when the URL already identifies an exported/imported comment
  • add a focused regression test for URL-based comment deduplication

Test plan

  • go test ./bridge/github -run TestGithubImporterDeduplicatesCommentByURL -count=1
  • go test ./bridge/github -count=1
  • go test ./bridge/... -count=1
  • git diff --check

Notes

This PR is intentionally limited to the comment duplication path described in #1582. It does not change issue/body import behavior.

AI assistance disclosure: I used an AI coding assistant to prepare this patch and locally verified the commands above.

When a GitHub bridge pull sees a comment whose node ID does not match stored metadata, fall back to the stable comment URL before creating a new git-bug comment operation. This keeps push/pull round trips from inflating comment histories for comments that were already exported.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GitHub bridge: push then pull duplicates comments (bugs dedupe correctly, comments do not) — v0.10.1

1 participant