diff --git a/go.mod b/go.mod index 5cfe949..69adc0b 100644 --- a/go.mod +++ b/go.mod @@ -4,5 +4,5 @@ go 1.14 require ( github.com/stretchr/testify v1.6.1 - github.com/tomhjp/gh-action-jira v0.1.0 + github.com/tomhjp/gh-action-jira v0.1.1 ) diff --git a/go.sum b/go.sum index dc6d1c6..793b80f 100644 --- a/go.sum +++ b/go.sum @@ -9,6 +9,8 @@ github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/tomhjp/gh-action-jira v0.1.0 h1:7/0uQCxCT0mQ5cYGaAV0A3bGo/55jyhHaDNLvvl1qF0= github.com/tomhjp/gh-action-jira v0.1.0/go.mod h1:ToAaW7uKSN8UP2aztAkiMl2ShRtn0n7vRkN1visxwFc= +github.com/tomhjp/gh-action-jira v0.1.1 h1:QST7UUVzfmCp3hyWsq8fiiikNmeLsjzRKte05bN1wcM= +github.com/tomhjp/gh-action-jira v0.1.1/go.mod h1:ToAaW7uKSN8UP2aztAkiMl2ShRtn0n7vRkN1visxwFc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= diff --git a/main.go b/main.go index 85762ea..511b5c7 100644 --- a/main.go +++ b/main.go @@ -10,6 +10,7 @@ import ( "os" "github.com/tomhjp/gh-action-jira/config" + "github.com/tomhjp/gh-action-jira/format" "github.com/tomhjp/gh-action-jira/jira" ) @@ -32,7 +33,7 @@ func create() error { extraFields := map[string]interface{}{} err := json.Unmarshal([]byte(extraFieldsString), &extraFields) if err != nil { - return fmt.Errorf("failed to deserialise extraFields: %s", err) + return fmt.Errorf("failed to deserialise extraFields: %w", err) } config, err := config.ReadConfig() @@ -40,6 +41,11 @@ func create() error { return err } + description, err = format.GitHubToJira(description) + if err != nil { + return fmt.Errorf("failed to convert GitHub markdown to Jira: %w", err) + } + key, err := createIssue(config, project, issueType, summary, description, extraFields) if err != nil { return err