aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/github/export.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2022-12-23 01:48:14 +0100
committerGitHub <noreply@github.com>2022-12-23 01:48:14 +0100
commit0a5a0ec1ef4ad98bc2116a953e201f96474941ab (patch)
tree660a9b17b5247fe2f954bfa814cce3193c5afa23 /bridge/github/export.go
parent108518530e822e3bdf59c8bfc333ad0bbe2d5fc8 (diff)
parent95911100823b5c809225d664de74ad2d64e91972 (diff)
downloadgit-bug-0a5a0ec1ef4ad98bc2116a953e201f96474941ab.tar.gz
Merge pull request #938 from MichaelMure/cache-reorg
Generic cache layer
Diffstat (limited to 'bridge/github/export.go')
-rw-r--r--bridge/github/export.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/bridge/github/export.go b/bridge/github/export.go
index 675ed039..0d340b49 100644
--- a/bridge/github/export.go
+++ b/bridge/github/export.go
@@ -20,7 +20,6 @@ import (
"github.com/MichaelMure/git-bug/cache"
"github.com/MichaelMure/git-bug/entities/bug"
"github.com/MichaelMure/git-bug/entities/common"
- "github.com/MichaelMure/git-bug/entities/identity"
"github.com/MichaelMure/git-bug/entity"
"github.com/MichaelMure/git-bug/entity/dag"
)
@@ -89,8 +88,8 @@ func (ge *githubExporter) cacheAllClient(repo *cache.RepoCache) error {
continue
}
- user, err := repo.ResolveIdentityImmutableMetadata(metaKeyGithubLogin, login)
- if err == identity.ErrIdentityNotExist {
+ user, err := repo.Identities().ResolveIdentityImmutableMetadata(metaKeyGithubLogin, login)
+ if entity.IsErrNotFound(err) {
continue
}
if err != nil {
@@ -160,10 +159,10 @@ func (ge *githubExporter) ExportAll(ctx context.Context, repo *cache.RepoCache,
allIdentitiesIds = append(allIdentitiesIds, id)
}
- allBugsIds := repo.AllBugsIds()
+ allBugsIds := repo.Bugs().AllIds()
for _, id := range allBugsIds {
- b, err := repo.ResolveBug(id)
+ b, err := repo.Bugs().Resolve(id)
if err != nil {
out <- core.NewExportError(errors.Wrap(err, "can't load bug"), id)
return