aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/gitlab/export.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2022-11-15 12:25:48 +0100
committerGitHub <noreply@github.com>2022-11-15 12:25:48 +0100
commit9b393b487308da156c5988bb7c2d2747f7b7f8aa (patch)
tree8cf4307bf48f016e0f8728c311bcc53ce38432e3 /bridge/gitlab/export.go
parent55a2e8e4485fe63fbda759540958c7190dfeb85c (diff)
parent3c6ebc2bfd50b72ff786a2cfd3bbdeb15b478dd3 (diff)
downloadgit-bug-9b393b487308da156c5988bb7c2d2747f7b7f8aa.tar.gz
Merge pull request #913 from MichaelMure/comment-id-fix
core: bubble up the comment ID when created, or edited the first comment
Diffstat (limited to 'bridge/gitlab/export.go')
-rw-r--r--bridge/gitlab/export.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/bridge/gitlab/export.go b/bridge/gitlab/export.go
index 04972455..83465428 100644
--- a/bridge/gitlab/export.go
+++ b/bridge/gitlab/export.go
@@ -288,7 +288,7 @@ func (ge *gitlabExporter) exportBug(ctx context.Context, b *cache.BugCache, out
return
}
- out <- core.NewExportComment(op.Id())
+ out <- core.NewExportComment(b.Id())
idString = strconv.Itoa(id)
// cache comment id
@@ -307,7 +307,7 @@ func (ge *gitlabExporter) exportBug(ctx context.Context, b *cache.BugCache, out
return
}
- out <- core.NewExportCommentEdition(op.Id())
+ out <- core.NewExportCommentEdition(b.Id())
id = bugGitlabID
} else {
@@ -315,13 +315,13 @@ func (ge *gitlabExporter) exportBug(ctx context.Context, b *cache.BugCache, out
// case comment edition operation: we need to edit the Gitlab comment
commentID, ok := ge.cachedOperationIDs[targetId]
if !ok {
- out <- core.NewExportError(fmt.Errorf("unexpected error: comment id not found"), op.Target)
+ out <- core.NewExportError(fmt.Errorf("unexpected error: comment id not found"), b.Id())
return
}
commentIDint, err := strconv.Atoi(commentID)
if err != nil {
- out <- core.NewExportError(fmt.Errorf("unexpected comment id format"), op.Target)
+ out <- core.NewExportError(fmt.Errorf("unexpected comment id format"), b.Id())
return
}
@@ -331,7 +331,7 @@ func (ge *gitlabExporter) exportBug(ctx context.Context, b *cache.BugCache, out
return
}
- out <- core.NewExportCommentEdition(op.Id())
+ out <- core.NewExportCommentEdition(b.Id())
id = commentIDint
}
@@ -342,7 +342,7 @@ func (ge *gitlabExporter) exportBug(ctx context.Context, b *cache.BugCache, out
return
}
- out <- core.NewExportStatusChange(op.Id())
+ out <- core.NewExportStatusChange(b.Id())
id = bugGitlabID
case *bug.SetTitleOperation:
@@ -352,7 +352,7 @@ func (ge *gitlabExporter) exportBug(ctx context.Context, b *cache.BugCache, out
return
}
- out <- core.NewExportTitleEdition(op.Id())
+ out <- core.NewExportTitleEdition(b.Id())
id = bugGitlabID
case *bug.LabelChangeOperation:
@@ -378,7 +378,7 @@ func (ge *gitlabExporter) exportBug(ctx context.Context, b *cache.BugCache, out
return
}
- out <- core.NewExportLabelChange(op.Id())
+ out <- core.NewExportLabelChange(b.Id())
id = bugGitlabID
default:
panic("unhandled operation type case")