diff options
author | Josh Bialkowski <josh.bialkowski@gmail.com> | 2020-02-17 13:37:57 -0800 |
---|---|---|
committer | Josh Bialkowski <josh.bialkowski@gmail.com> | 2020-02-17 13:37:57 -0800 |
commit | 4827d3f9ab77b01de7e34a9c7b4878fc94b942e5 (patch) | |
tree | 307543910bd3c198d811d77150a930dc91edfdca /bridge/jira | |
parent | d349137ea5dffa0ae01fbf1a0fba75e11778aabb (diff) | |
download | git-bug-4827d3f9ab77b01de7e34a9c7b4878fc94b942e5.tar.gz |
metaKeyJiraOperationId -> metaKeyJiraDerivedId
Diffstat (limited to 'bridge/jira')
-rw-r--r-- | bridge/jira/import.go | 32 | ||||
-rw-r--r-- | bridge/jira/jira.go | 14 |
2 files changed, 23 insertions, 23 deletions
diff --git a/bridge/jira/import.go b/bridge/jira/import.go index 61870dd1..f35f114f 100644 --- a/bridge/jira/import.go +++ b/bridge/jira/import.go @@ -383,7 +383,7 @@ func (ji *jiraImporter) ensureChange(repo *cache.RepoCache, b *cache.BugCache, e // If we have an operation which is already mapped to the entire changelog // entry then that means this changelog entry was induced by an export // operation and we've already done the match, so we skip this one - _, err := b.ResolveOperationWithMetadata(metaKeyJiraOperationId, entry.ID) + _, err := b.ResolveOperationWithMetadata(metaKeyJiraDerivedId, entry.ID) if err == nil { return nil } else if err != cache.ErrNoMatchingOp { @@ -425,7 +425,7 @@ func (ji *jiraImporter) ensureChange(repo *cache.RepoCache, b *cache.BugCache, e opr, isRightType := potentialOp.(*bug.LabelChangeOperation) if isRightType && labelSetsMatch(addedLabels, opr.Added) && labelSetsMatch(removedLabels, opr.Removed) { _, err := b.SetMetadata(opr.Id(), map[string]string{ - metaKeyJiraOperationId: entry.ID, + metaKeyJiraDerivedId: entry.ID, }) if err != nil { return err @@ -437,7 +437,7 @@ func (ji *jiraImporter) ensureChange(repo *cache.RepoCache, b *cache.BugCache, e opr, isRightType := potentialOp.(*bug.SetStatusOperation) if isRightType && statusMap[opr.Status.String()] == item.To { _, err := b.SetMetadata(opr.Id(), map[string]string{ - metaKeyJiraOperationId: entry.ID, + metaKeyJiraDerivedId: entry.ID, }) if err != nil { return err @@ -451,7 +451,7 @@ func (ji *jiraImporter) ensureChange(repo *cache.RepoCache, b *cache.BugCache, e opr, isRightType := potentialOp.(*bug.SetTitleOperation) if isRightType && opr.Title == item.To { _, err := b.SetMetadata(opr.Id(), map[string]string{ - metaKeyJiraOperationId: entry.ID, + metaKeyJiraDerivedId: entry.ID, }) if err != nil { return err @@ -467,7 +467,7 @@ func (ji *jiraImporter) ensureChange(repo *cache.RepoCache, b *cache.BugCache, e opr.Target == b.Snapshot().Operations[0].Id() && opr.Message == item.ToString { _, err := b.SetMetadata(opr.Id(), map[string]string{ - metaKeyJiraOperationId: entry.ID, + metaKeyJiraDerivedId: entry.ID, }) if err != nil { return err @@ -482,7 +482,7 @@ func (ji *jiraImporter) ensureChange(repo *cache.RepoCache, b *cache.BugCache, e // changelog entry item as a separate git-bug operation. for idx, item := range entry.Items { derivedID := getIndexDerivedID(entry.ID, idx) - _, err := b.ResolveOperationWithMetadata(metaKeyJiraOperationId, derivedID) + _, err := b.ResolveOperationWithMetadata(metaKeyJiraDerivedId, derivedID) if err == nil { continue } @@ -502,8 +502,8 @@ func (ji *jiraImporter) ensureChange(repo *cache.RepoCache, b *cache.BugCache, e addedLabels, removedLabels, map[string]string{ - metaKeyJiraId: entry.ID, - metaKeyJiraOperationId: derivedID, + metaKeyJiraId: entry.ID, + metaKeyJiraDerivedId: derivedID, }, ) if err != nil { @@ -521,8 +521,8 @@ func (ji *jiraImporter) ensureChange(repo *cache.RepoCache, b *cache.BugCache, e author, entry.Created.Unix(), map[string]string{ - metaKeyJiraId: entry.ID, - metaKeyJiraOperationId: derivedID, + metaKeyJiraId: entry.ID, + metaKeyJiraDerivedId: derivedID, }, ) if err != nil { @@ -535,8 +535,8 @@ func (ji *jiraImporter) ensureChange(repo *cache.RepoCache, b *cache.BugCache, e author, entry.Created.Unix(), map[string]string{ - metaKeyJiraId: entry.ID, - metaKeyJiraOperationId: derivedID, + metaKeyJiraId: entry.ID, + metaKeyJiraDerivedId: derivedID, }, ) if err != nil { @@ -559,8 +559,8 @@ func (ji *jiraImporter) ensureChange(repo *cache.RepoCache, b *cache.BugCache, e entry.Created.Unix(), string(item.ToString), map[string]string{ - metaKeyJiraId: entry.ID, - metaKeyJiraOperationId: derivedID, + metaKeyJiraId: entry.ID, + metaKeyJiraDerivedId: derivedID, }, ) if err != nil { @@ -577,8 +577,8 @@ func (ji *jiraImporter) ensureChange(repo *cache.RepoCache, b *cache.BugCache, e entry.Created.Unix(), string(item.ToString), map[string]string{ - metaKeyJiraId: entry.ID, - metaKeyJiraOperationId: derivedID, + metaKeyJiraId: entry.ID, + metaKeyJiraDerivedId: derivedID, }, ) if err != nil { diff --git a/bridge/jira/jira.go b/bridge/jira/jira.go index 0ba27df3..b891ee3d 100644 --- a/bridge/jira/jira.go +++ b/bridge/jira/jira.go @@ -15,13 +15,13 @@ import ( const ( target = "jira" - metaKeyJiraId = "jira-id" - metaKeyJiraOperationId = "jira-derived-id" - metaKeyJiraKey = "jira-key" - metaKeyJiraUser = "jira-user" - metaKeyJiraProject = "jira-project" - metaKeyJiraExportTime = "jira-export-time" - metaKeyJiraLogin = "jira-login" + metaKeyJiraId = "jira-id" + metaKeyJiraDerivedId = "jira-derived-id" + metaKeyJiraKey = "jira-key" + metaKeyJiraUser = "jira-user" + metaKeyJiraProject = "jira-project" + metaKeyJiraExportTime = "jira-export-time" + metaKeyJiraLogin = "jira-login" confKeyBaseUrl = "base-url" confKeyProject = "project" |