The default bug view has changed. See this FAQ.

Automatically linkify "bug XXXXXX" when present in tree status reason/motd

RESOLVED FIXED

Status

Tree Management Graveyard
TBPL
RESOLVED FIXED
5 years ago
2 years ago

People

(Reporter: graememcc, Assigned: graememcc)

Tracking

Dependency tree / graph

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

5 years ago
Per https://github.com/catlee/treestatus/pull/28/ catlee would prefer this is handled on the TBPL side rather than the TreeStatus side.

Again, I'm using the simple heuristic that a bug number followed by a </a> is already linked, and won't change it in this case.

I'm using {6,7} for the digit count: at this stage I assume any future tree closures are not going to be due to 5-digit bugs.
(Assignee)

Comment 1

5 years ago
Created attachment 659343 [details] [diff] [review]
v1
Attachment #659343 - Flags: review?(bmo)
Comment on attachment 659343 [details] [diff] [review]
v1

Review of attachment 659343 [details] [diff] [review]:
-----------------------------------------------------------------

We already have a function for that: http://hg.mozilla.org/users/mstange_themasta.com/tinderboxpushlog/file/2d0555694735/js/UserInterface.js#l755
Use that and we are good to go :-)
Attachment #659343 - Flags: review-
(Assignee)

Comment 3

5 years ago
Created attachment 659351 [details] [diff] [review]
v2

Ah never spotted that - thanks!
Attachment #659343 - Attachment is obsolete: true
Attachment #659343 - Flags: review?(bmo)
Attachment #659351 - Flags: review?(arpad.borsos)
Comment on attachment 659351 [details] [diff] [review]
v2

Review of attachment 659351 [details] [diff] [review]:
-----------------------------------------------------------------

Good. Although it has no </a> handling, well then we just need to have the convention to not have linked bugs in the tree status.
Attachment #659351 - Flags: review?(arpad.borsos) → review+
(Assignee)

Comment 5

5 years ago
Actually, that escapeContent() call in _linkBugs will prevent us adding other links in to the reason field - e.g. the wiki.m.o link in the current inbound message - the HTML will be rendered as plaintext.
Hm, I missed that then. So we could add another option to prevent that.
(Assignee)

Comment 7

5 years ago
Created attachment 659471 [details] [diff] [review]
v3

Added an additional parameter to _linkBugs to signal whether to escape the string. This let me reinstate the </a> check - it was redundant when the text was escaped.
Attachment #659351 - Attachment is obsolete: true
Attachment #659471 - Flags: review?(arpad.borsos)
Attachment #659471 - Flags: review?(arpad.borsos) → review+
(Assignee)

Comment 8

5 years ago
http://hg.mozilla.org/users/mstange_themasta.com/tinderboxpushlog/rev/fe2d7ba37836
Assignee: nobody → graememcc_firefox
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Thank you for this Graeme! :-)
Depends on: 790559
Depends on: 805550
Product: Webtools → Tree Management
Product: Tree Management → Tree Management Graveyard
You need to log in before you can comment on or make changes to this bug.