Closed Bug 789576 Opened 12 years ago Closed 12 years ago

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

Categories

(Tree Management Graveyard :: TBPL, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: graememcc, Assigned: graememcc)

References

Details

Attachments

(1 file, 2 obsolete files)

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.
Attached patch v1 (obsolete) — Splinter Review
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-
Attached patch v2 (obsolete) — Splinter Review
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+
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.
Attached patch v3Splinter Review
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: nobody → graememcc_firefox
Status: NEW → RESOLVED
Closed: 12 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.

Attachment

General

Created:
Updated:
Size: