Skip to content

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

Closed

Description

@kaanchan

Summary

A GitHub-bridge push followed by pull re-imports the pushed comments as new operations, so every round trip adds one duplicate comment per already-commented bug. Bugs themselves are not duplicated — #690 / #726 appear to hold — the regression is comment-scoped only.

Version

  • git-bug version: v0.10.1
  • Windows 11 (26200), GitHub bridge, token auth

Steps to reproduce

  1. A repo with existing bugs, at least one carrying a comment beyond the description (i.e. comments >= 2 in git-bug bug --format json).
  2. Create an empty GitHub repo and configure a bridge to it:
    gh auth token | git-bug bridge new --name sandbox --target github \
      --owner <owner> --project <repo> --login <login> --token-stdin --non-interactive
  3. Push:
    git-bug bridge push sandbox      # -> "exported 20 issues"
  4. Pull straight back:
    git-bug bridge pull sandbox

Expected

pull recognises the issues/comments it just exported (via the stored bridge metadata) and imports nothing for them.

Actual

pull emits new comment operations for bugs that were just exported:

[471b7a9] new comment: 437e13b7...
[5988ea1] new comment: 559c858e...
[5988ea1] changed status with op: c04b2dae...
[7cd1ae6] new comment: 72c1d51e...
[7cd1ae6] changed status with op: d28db44d...
imported 2 issues and 0 identities with sandbox bridge

Comment counts before vs after the round trip (only the 3 bugs that had comments):

bug before after
5988ea1 2 3
7cd1ae6 2 3
471b7a9 2 3

The 2 genuinely GitHub-native issues imported correctly — that part is right. Status-change operations are also re-applied on several bugs.

Each further push/pull cycle adds another duplicate, so comment history inflates monotonically and bidirectional sync is not idempotent.

Notes

  • The description (comment[0]) maps correctly to the issue body and comment[1..] to GitHub comments on export — export fidelity itself is good (bodies, open/closed status, and comments all transferred).
  • Only the re-import side fails to deduplicate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions