aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/github/import.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-03-28 17:08:27 +0100
committerMichael Muré <batolettre@gmail.com>2020-03-28 17:08:27 +0100
commitfae3b2e7db1249b4a284c80e5050f56c0143d041 (patch)
treedb180562b9239357060807e9b7a9a64ee1f31e70 /bridge/github/import.go
parent4397766800fd02517501a969b8212708badd3312 (diff)
downloadgit-bug-fae3b2e7db1249b4a284c80e5050f56c0143d041.tar.gz
github: tighten the import matching
Diffstat (limited to 'bridge/github/import.go')
-rw-r--r--bridge/github/import.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/bridge/github/import.go b/bridge/github/import.go
index a74c49c5..78e93436 100644
--- a/bridge/github/import.go
+++ b/bridge/github/import.go
@@ -108,7 +108,10 @@ func (gi *githubImporter) ensureIssue(repo *cache.RepoCache, issue issueTimeline
}
// resolve bug
- b, err := repo.ResolveBugCreateMetadata(metaKeyGithubUrl, issue.Url.String())
+ b, err := repo.ResolveBugMatcher(func(excerpt *cache.BugExcerpt) bool {
+ return excerpt.CreateMetadata[core.MetaKeyOrigin] == target &&
+ excerpt.CreateMetadata[metaKeyGithubId] == parseId(issue.Id)
+ })
if err != nil && err != bug.ErrBugNotExist {
return nil, err
}