aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/launchpad/import.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-03-28 17:08:58 +0100
committerMichael Muré <batolettre@gmail.com>2020-03-28 17:08:58 +0100
commita8666bfeb8255c2a0a9eed55ba143d65237febbf (patch)
treeb6fb722c630a7951c83527aea95352b8548f337c /bridge/launchpad/import.go
parentfae3b2e7db1249b4a284c80e5050f56c0143d041 (diff)
downloadgit-bug-a8666bfeb8255c2a0a9eed55ba143d65237febbf.tar.gz
launchpad: tighten the bug matching
Diffstat (limited to 'bridge/launchpad/import.go')
-rw-r--r--bridge/launchpad/import.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/bridge/launchpad/import.go b/bridge/launchpad/import.go
index 3b6d7fe0..7f528c7d 100644
--- a/bridge/launchpad/import.go
+++ b/bridge/launchpad/import.go
@@ -62,7 +62,10 @@ func (li *launchpadImporter) ImportAll(ctx context.Context, repo *cache.RepoCach
return
default:
lpBugID := fmt.Sprintf("%d", lpBug.ID)
- b, err := repo.ResolveBugCreateMetadata(metaKeyLaunchpadID, lpBugID)
+ b, err := repo.ResolveBugMatcher(func(excerpt *cache.BugExcerpt) bool {
+ return excerpt.CreateMetadata[core.MetaKeyOrigin] == target &&
+ excerpt.CreateMetadata[metaKeyLaunchpadID] == lpBugID
+ })
if err != nil && err != bug.ErrBugNotExist {
out <- core.NewImportError(err, entity.Id(lpBugID))
return