aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/jira/import.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2022-08-20 11:01:37 +0200
committerGitHub <noreply@github.com>2022-08-20 11:01:37 +0200
commit855684149740e2fb8eec21f3d97df2eba39b27c5 (patch)
treea3bd60a9f533fc6fc11a094038d095510210cd23 /bridge/jira/import.go
parent58df94d38d754bff4dcca11e2ae4b99326a9a87e (diff)
parent8818d091e85087766d7f493b7dfaf1aedc3a4ab0 (diff)
downloadgit-bug-855684149740e2fb8eec21f3d97df2eba39b27c5.tar.gz
Merge pull request #856 from MichaelMure/common-status
move bug.Status in entities/common for reuse
Diffstat (limited to 'bridge/jira/import.go')
-rw-r--r--bridge/jira/import.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/bridge/jira/import.go b/bridge/jira/import.go
index fb551b47..c297abcf 100644
--- a/bridge/jira/import.go
+++ b/bridge/jira/import.go
@@ -13,6 +13,7 @@ import (
"github.com/MichaelMure/git-bug/bridge/core/auth"
"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/entity"
"github.com/MichaelMure/git-bug/entity/dag"
"github.com/MichaelMure/git-bug/util/text"
@@ -516,7 +517,7 @@ func (ji *jiraImporter) ensureChange(repo *cache.RepoCache, b *cache.BugCache, e
statusStr, hasMap := statusMap[item.To]
if hasMap {
switch statusStr {
- case bug.OpenStatus.String():
+ case common.OpenStatus.String():
op, err := b.OpenRaw(
author,
entry.Created.Unix(),
@@ -530,7 +531,7 @@ func (ji *jiraImporter) ensureChange(repo *cache.RepoCache, b *cache.BugCache, e
}
ji.out <- core.NewImportStatusChange(op.Id())
- case bug.ClosedStatus.String():
+ case common.ClosedStatus.String():
op, err := b.CloseRaw(
author,
entry.Created.Unix(),
@@ -608,8 +609,8 @@ func getStatusMap(conf core.Configuration) (map[string]string, error) {
mapStr, hasConf := conf[confKeyIDMap]
if !hasConf {
return map[string]string{
- bug.OpenStatus.String(): "1",
- bug.ClosedStatus.String(): "6",
+ common.OpenStatus.String(): "1",
+ common.ClosedStatus.String(): "6",
}, nil
}