aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/github/import.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2021-05-03 11:45:15 +0200
committerMichael Muré <batolettre@gmail.com>2022-08-22 13:25:26 +0200
commit45b04351d8d02e53b3401b0ee23f7cbe750b63cd (patch)
tree59d203ef6c0f6a497b7074cd5617c8869cac3b14 /bridge/github/import.go
parent43026fc53669d462a60feec7d22aec090959be72 (diff)
downloadgit-bug-45b04351d8d02e53b3401b0ee23f7cbe750b63cd.tar.gz
bug: have a type for combined ids, fix https://github.com/MichaelMure/git-bug/issues/653
Diffstat (limited to 'bridge/github/import.go')
-rw-r--r--bridge/github/import.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/bridge/github/import.go b/bridge/github/import.go
index 722bf256..5b2bf54b 100644
--- a/bridge/github/import.go
+++ b/bridge/github/import.go
@@ -405,6 +405,7 @@ func (gi *githubImporter) ensureCommentEdit(ctx context.Context, repo *cache.Rep
if err != nil {
return err
}
+ // check if the comment edition already exist
_, err = b.ResolveOperationWithMetadata(metaKeyGithubId, parseId(edit.Id))
if err == nil {
return nil
@@ -428,7 +429,7 @@ func (gi *githubImporter) ensureCommentEdit(ctx context.Context, repo *cache.Rep
op, err := b.EditCommentRaw(
editor,
edit.CreatedAt.Unix(),
- target,
+ entity.CombineIds(b.Id(), target),
text.Cleanup(string(*edit.Diff)),
map[string]string{
metaKeyGithubId: parseId(edit.Id),