diff options
author | Michael Muré <batolettre@gmail.com> | 2020-02-09 20:08:12 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2020-02-09 20:23:38 +0100 |
commit | b3d3612393387c83fa43f908dbb8e2a71068c834 (patch) | |
tree | e4609e21dc74e535d45b38cd7d0504681c544160 /bridge/jira/jira.go | |
parent | dca85b309a0a82e9993a345964d0831ab2876fb4 (diff) | |
parent | 3caffeef4d2ed25d4eb5d4bfd262f4fc3b92561f (diff) | |
download | git-bug-b3d3612393387c83fa43f908dbb8e2a71068c834.tar.gz |
Merge remote-tracking branch 'origin/master' into cheshirekow-jira
Diffstat (limited to 'bridge/jira/jira.go')
-rw-r--r-- | bridge/jira/jira.go | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/bridge/jira/jira.go b/bridge/jira/jira.go index accb9e7c..43a11c05 100644 --- a/bridge/jira/jira.go +++ b/bridge/jira/jira.go @@ -3,10 +3,32 @@ package jira import ( "sort" + "time" "github.com/MichaelMure/git-bug/bridge/core" ) +const ( + target = "jira" + + metaKeyJiraLogin = "jira-login" + + keyServer = "server" + keyProject = "project" + keyCredentialsType = "credentials-type" + keyCredentialsFile = "credentials-file" + keyUsername = "username" + keyPassword = "password" + keyIDMap = "bug-id-map" + keyIDRevMap = "bug-id-revmap" + keyCreateDefaults = "create-issue-defaults" + keyCreateGitBug = "create-issue-gitbug-id" + + defaultTimeout = 60 * time.Second +) + +var _ core.BridgeImpl = &Jira{} + // Jira Main object for the bridge type Jira struct{} @@ -15,6 +37,10 @@ func (*Jira) Target() string { return target } +func (*Jira) LoginMetaKey() string { + return metaKeyJiraLogin +} + // NewImporter returns the jira importer func (*Jira) NewImporter() core.Importer { return &jiraImporter{} @@ -39,8 +65,7 @@ func stringInSlice(needle string, haystack []string) bool { // 1. elements found only in the first input list // 2. elements found only in the second input list // 3. elements found in both input lists -func setSymmetricDifference( - setA, setB []string) ([]string, []string, []string) { +func setSymmetricDifference(setA, setB []string) ([]string, []string, []string) { sort.Strings(setA) sort.Strings(setB) |