Skip to content

Commit

Permalink
do not backtick quote the user message, given it contains GH urls now
Browse files Browse the repository at this point in the history
  • Loading branch information
ara4n committed Sep 28, 2018
1 parent 7f9cd51 commit 10c36dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/github.com/matrix-org/rageshake/submit.go
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ func buildGithubIssueRequest(p parsedPayload, listingURL string) github.IssueReq
}

var bodyBuf bytes.Buffer
fmt.Fprintf(&bodyBuf, "User message:\n```\n%s\n```\n", p.UserText)
fmt.Fprintf(&bodyBuf, "User message:\n\n%s\n\n", p.UserText)
for k, v := range p.Data {
fmt.Fprintf(&bodyBuf, "%s: `%s`\n", k, v)
}
Expand Down
4 changes: 2 additions & 2 deletions src/github.com/matrix-org/rageshake/submit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ riot-web
if *issueReq.Title != "test words." {
t.Errorf("Title: got %s, want %s", *issueReq.Title, "test words.")
}
expectedBody := "User message:\n```\n\ntest words.\n```"
expectedBody := "User message:\n\n\ntest words.\n"
if !strings.HasPrefix(*issueReq.Body, expectedBody) {
t.Errorf("Body: got %s, want %s", *issueReq.Body, expectedBody)
}
Expand All @@ -421,7 +421,7 @@ Content-Disposition: form-data; name="text"
if *issueReq.Title != "Untitled report" {
t.Errorf("Title: got %s, want %s", *issueReq.Title, "Untitled report")
}
expectedBody := "User message:\n```\n\n```"
expectedBody := "User message:\n\n\n"
if !strings.HasPrefix(*issueReq.Body, expectedBody) {
t.Errorf("Body: got %s, want %s", *issueReq.Body, expectedBody)
}
Expand Down

0 comments on commit 10c36dc

Please sign in to comment.