Bug 1287911 - Add the ability to tag revisions with metadata (#1706) r=camd

* Bug 1287911 - Add the ability to tag revisions with metadata

* Bug 1287911 - Make backout commit text be red in the list of revisions
This commit is contained in:
KWierso 2016-07-28 17:55:43 +01:00 коммит произвёл GitHub
Родитель 71c02dbb26
Коммит 09ef553945
3 изменённых файлов: 14 добавлений и 1 удалений

Просмотреть файл

@ -121,6 +121,10 @@ fieldset[disabled] .btn-resultset:hover {
overflow: auto;
}
.revision[data-tags~="backout"] .revision-comment{
color: red;
}
.revision-holder > a {
padding-top: 2px;
font: 11px "Lucida Console",Monaco,monospace;

Просмотреть файл

@ -147,7 +147,7 @@
<script type="'text/ng-template'" id="revisionsClone.html">
<div class="clearfix"></div>
<li>
<span class="revision">
<span class="revision" data-tags="{{comment_tags}}">
<span class="revision-holder">
<a href="{{currentRepo.getRevisionHref(revision)}}"
title="Open revision {{revision}} on {{currentRepo.url}}"

Просмотреть файл

@ -460,6 +460,15 @@ treeherder.directive('thCloneJobs', [
// Only use the first line of the full commit message.
revision.escaped_comment = _.escape(revision.comments.split('\n')[0]);
revision.escaped_comment_linkified = linkifyBugsFilter(revision.escaped_comment);
// Parse the comment so we can tag things like backouts
var tags = "";
if(revision.escaped_comment.search("Backed out") >= 0 ||
revision.escaped_comment.search("Back out") >= 0) {
tags += "backout ";
}
revision.comment_tags = tags.trim();
revisionHtml = revisionInterpolator(revision);
ulEl.append(revisionHtml);
}