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

Side by Side Diff: Tools/GardeningServer/model/ct-commit.html

Issue 402603007: Get sheriff-o-matic data from auto-sheriff.appspot.com. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address review comments Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Tools/GardeningServer/model/ct-commit-log.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!-- 1 <!--
2 Copyright 2014 The Chromium Authors. All rights reserved. 2 Copyright 2014 The Chromium Authors. All rights reserved.
3 Use of this source code is governed by a BSD-style license that can be 3 Use of this source code is governed by a BSD-style license that can be
4 found in the LICENSE file. 4 found in the LICENSE file.
5 --> 5 -->
6 6
7 <script> 7 <script>
8 function CTCommit(author, message) { 8 function CTCommit(author, message, baseUrl) {
9 this.author = author; 9 this.author = author;
10 this.message = message; 10 this.message = message;
11 this.revision = this._findRevision(); 11 this.revision = this._findRevision();
12 // FIXME: This is a needlessly expensive way to grab the first line. 12 // FIXME: This is a needlessly expensive way to grab the first line.
13 this.summary = this.message.split('\n')[0]; 13 this.summary = this.message.split('\n')[0];
14 this._baseUrl = baseUrl;
14 } 15 }
15 16
17 Object.defineProperty(CTCommit.prototype, "url", {
18 get: function url() {
19 return this._baseUrl + '?' + Object.toQueryString({
20 view: 'rev',
21 revision: this.revision,
22 });
23 },
24 });
25
16 CTCommit.prototype._findRevision = function() { 26 CTCommit.prototype._findRevision = function() {
17 // FIXME: Make this regexp more general. 27 // FIXME: Make this regexp more general.
18 var regexp = /git-svn-id: svn:\/\/svn.chromium.org\/blink\/trunk@(\d+)/; 28 var regexp = /git-svn-id: svn:\/\/svn.chromium.org\/blink\/trunk@(\d+)/;
19 var match = regexp.exec(this.message); 29 var match = regexp.exec(this.message);
20 if (match) 30 if (match)
21 return parseInt(match[1], 10); 31 return parseInt(match[1], 10);
22 return null; 32 return null;
23 } 33 }
24 </script> 34 </script>
OLDNEW
« no previous file with comments | « no previous file | Tools/GardeningServer/model/ct-commit-log.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698