Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Commit

Permalink
Don't format input
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhjp committed Oct 28, 2020
1 parent c801248 commit 1beb1d4
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 9 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ module github.com/tomhjp/gh-action-jira-create
go 1.14

require (
github.com/kalafut/m2j v0.0.1
github.com/stretchr/testify v1.6.1
github.com/tomhjp/gh-action-jira v0.1.0
)
4 changes: 0 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/kalafut/m2j v0.0.0-20200831013012-43edf17eb155 h1:eZA4bGAG/36ygQeYyKtKEbuW5C3R80uvoMLQP6bsVvM=
github.com/kalafut/m2j v0.0.0-20200831013012-43edf17eb155/go.mod h1:1tGqsPGFpUsjWhUlxSWTVClcP0spd4hQpA/lRPiAHIc=
github.com/kalafut/m2j v0.0.1 h1:07N2GRuQhm+tpUKRDiGYVGoEI0TgmlYsOyLjgUQGnis=
github.com/kalafut/m2j v0.0.1/go.mod h1:1tGqsPGFpUsjWhUlxSWTVClcP0spd4hQpA/lRPiAHIc=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
Expand Down
4 changes: 1 addition & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import (
"net/url"
"os"

"github.com/kalafut/m2j"

"github.com/tomhjp/gh-action-jira/config"
"github.com/tomhjp/gh-action-jira/jira"
)
Expand Down Expand Up @@ -107,7 +105,7 @@ func constructPayload(project, issueType, summary, description string, extraFiel
issueType,
},
"summary": summary,
"description": m2j.MDToJira(description),
"description": description,
},
}
for key, value := range extraFields {
Expand Down
2 changes: 1 addition & 1 deletion main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

func TestConstructPayload(t *testing.T) {
const expectedJSON = `{"fields":{"custom_field":[{"name":"foo"}],"description":"The description with some {{code}}","foo":"bar","issuetype":{"name":"Bug"},"project":{"key":"FOO"},"summary":"The summary"}}`
reqBody, err := json.Marshal(constructPayload("FOO", "Bug", "The summary", "The description with some `code`", map[string]interface{}{
reqBody, err := json.Marshal(constructPayload("FOO", "Bug", "The summary", "The description with some {{code}}", map[string]interface{}{
"foo": "bar",
"custom_field": []map[string]string{{"name": "foo"}},
}))
Expand Down

0 comments on commit 1beb1d4

Please sign in to comment.