Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(580)

Unified Diff: Tools/GardeningServer/scripts/ui/notifications.js

Issue 177123013: Garden-o-matic: Display bugs from the commit BUG=... line in commit summary (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Comment addressed Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Tools/GardeningServer/scripts/ui.js ('k') | Tools/GardeningServer/styles/notifications.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/GardeningServer/scripts/ui/notifications.js
diff --git a/Tools/GardeningServer/scripts/ui/notifications.js b/Tools/GardeningServer/scripts/ui/notifications.js
index bf3d77e3f7c39e881f5e0aea15fe9e8388ec0c92..8ddaed2bdc92a20e92c146dc6d04c02d3f3b9d1f 100644
--- a/Tools/GardeningServer/scripts/ui/notifications.js
+++ b/Tools/GardeningServer/scripts/ui/notifications.js
@@ -117,8 +117,12 @@ ui.notifications.SuspiciousCommit = base.extends(Cause, {
this._addDetail('title', commitData);
this._addDetail('author', commitData);
this._addDetail('reviewer', commitData);
- // FIXME: Add bugID detail.
- // this._addDetail('bugID', commitData, bugzilla.bugURL);
+ this._addDetail('bugID', commitData,
+ ui.urlForCrbug,
+ function(value) {
+ return value.split(/\s*,\s*/);
+ }
+ );
},
hasRevision: function(revision)
{
@@ -134,10 +138,17 @@ ui.notifications.SuspiciousCommit = base.extends(Cause, {
span.className = part;
if (linkFunction) {
- var link = base.createLinkNode(linkFunction(content), content);
- span.appendChild(link);
- } else
+ var parts = $.isArray(content) ? content : [content];
+ parts.forEach(function(item, index) {
+ if (index > 0)
+ span.appendChild(document.createTextNode(', '));
+ var link = base.createLinkNode(linkFunction(item), item);
+ link.className = part + '-item';
+ span.appendChild(link);
+ });
+ } else {
span.textContent = content;
+ }
}
});
« no previous file with comments | « Tools/GardeningServer/scripts/ui.js ('k') | Tools/GardeningServer/styles/notifications.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698