Closed Bug 1519139 Opened 5 years ago Closed 5 years ago

The Treeherder Bug Filer bot needs to learn about Markdown

Categories

(Tree Management :: Treeherder: Frontend, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jld, Assigned: KWierso)

References

Details

Attachments

(1 file)

(Not sure if this is the right component to file this, but I didn't see anything that looked like a better fit.)

Example: bug 1519050 comment #0

The pasted log is being interpreted as Markdown, which interacts badly with the use of quoting `like this' in some of the log messages. Markdown metacharacters can be escaped with backslashes, as I've done here, but for logs I think it makes more sense to use a code block, either by indenting 4 spaces

like this

or with the (GitHub extension) ``` “fence” syntax

like this

depending on what's easiest for the bot.

Alternately, there might be an API to post plain text comments.

Thank you for filing!

Wes, I don't suppose you'd mind taking a look at this? :-)

Flags: needinfo?(wkocher)

I can wrap the comments like Jed describes, but I think the solution in bug 1518967 would be better.

Depends on: 1518967
Flags: needinfo?(wkocher)
Component: Treeherder → Treeherder: Frontend
Priority: -- → P3

Please use code fences when you paste your logs.

https://help.github.com/articles/creating-and-highlighting-code-blocks/

Adding new escaping syntax unnecessarily complicates comment parsing on the Bugzilla side.

Please update the form on the treeherder side to add the code fences to the pasted logs.

Comment on attachment 9037366 [details] [review]
Link to GitHub pull-request: https://github.com/mozilla/treeherder/pull/4468

Quick, one-line patch to help work around the problem. :)

The "#[markdown(off)]" string *does* show up in the final comment, which may be unexpected by people reading the bugs, but it's unavoidable if you want to turn off markdown parsing.
Attachment #9037366 - Flags: review?(emorley)
Assignee: nobody → wkocher
Comment on attachment 9037366 [details] [review]
Link to GitHub pull-request: https://github.com/mozilla/treeherder/pull/4468

Thank you for the PR! :-)
Attachment #9037366 - Flags: review?(emorley) → review+
Commit pushed to master at https://github.com/mozilla/treeherder

https://github.com/mozilla/treeherder/commit/62b8879bcd0e366cc1c5304af67733413ceb8765
Bug 1519139 - Add "#[markdown(off)]" to bugfiler comments (#4468)

Bugzilla recently started parsing markdown in bug comments. This was
causing some issues for bugs filed with Treeherder's bug filer because
text was unintentionally being parsed as markdown.

This patch just adds a "#[markdown(off)]" to the beginning of the
comment field, which lets the comment escape being parsed as markdown.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: