Summary: | [results.webkit.org] Add ability to access Bugzilla and Radar links from commit messages | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Kevin Neal <kevin_neal> | ||||||||||||
Component: | Tools / Tests | Assignee: | Kevin Neal <kevin_neal> | ||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||
Severity: | Normal | CC: | jbedard, webkit-bug-importer | ||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||
Version: | WebKit Nightly Build | ||||||||||||||
Hardware: | Unspecified | ||||||||||||||
OS: | Unspecified | ||||||||||||||
Attachments: |
|
Description
Kevin Neal
2021-08-16 13:54:12 PDT
Created attachment 435690 [details]
Patch
Comment on attachment 435690 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=435690&action=review > Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/commit.js:145 > + this.bugUrls = json.message.match(/\b(https?):\/{2}[^\s<>&]+[^\.\s<>&,)]/gmi); Should probably only have 1 url > Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/commit.js:146 > + this.radarUrls = json.message.match(/\b(rdar):\/{2}[^\s<>&]+[^\.\s<>&,)]/gmi); Have we investigated performance of doing this for every commit instead of on-demand? > Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/timeline.js:196 > + ${node.label.message ? `<br><div>${linkify(escapeHTML(node.label.message.split('\n')[0]))}</div>` : ''} <hr>${node.label.bugUrls ? `<div>${linkify(escapeHTML(node.label.bugUrls.join(',')))}</div>` : ''}${node.label.radarUrls ? `<div>${linkify(escapeHTML(node.label.radarUrls.join(',')))}</div>` : ''} We probably don't want the <hr> divider if there are no bug urls, also, this divider should be the inverse color (white in dark mode, black in normal mode) Created attachment 435904 [details]
Patch
Created attachment 435918 [details]
Patch
Created attachment 435985 [details]
Patch
Comment on attachment 435985 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=435985&action=review > Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/commit.js:146 > + this.radarUrls = json.message.match(/\b(rdar):\/{2}[^\s<>&]+[^\.\s<>&,)]/gmi); The only question remaining here is if we should do this computation in the constructor, or on-demand? There might be a performance hit here. (In reply to Jonathan Bedard from comment #6) > Comment on attachment 435985 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=435985&action=review > > > Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/commit.js:146 > > + this.radarUrls = json.message.match(/\b(rdar):\/{2}[^\s<>&]+[^\.\s<>&,)]/gmi); > > The only question remaining here is if we should do this computation in the > constructor, or on-demand? There might be a performance hit here. Kevin, did you manage to find an answer for this question? I reviewed the performance of the app with a fully loaded set of commits and it took an average of 0.0119154 milliseconds to run the regexes. Created attachment 438527 [details]
Patch
Committed r282717 (241854@main): <https://commits.webkit.org/241854@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 438527 [details]. |