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

Unified Diff: Tools/GardeningServer/model/ct-commit.html

Issue 418253002: Expose the chromium waterfall in sheriff-o-matic. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: merge to ToT 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Tools/GardeningServer/model/ct-commit-log.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/GardeningServer/model/ct-commit.html
diff --git a/Tools/GardeningServer/model/ct-commit.html b/Tools/GardeningServer/model/ct-commit.html
index df6e968164419be8dbfff0d62dcc77291b7905e8..08a56c4990d2a0aea09723dcf2ecc933a68cb886 100644
--- a/Tools/GardeningServer/model/ct-commit.html
+++ b/Tools/GardeningServer/model/ct-commit.html
@@ -5,19 +5,31 @@ found in the LICENSE file.
-->
<script>
-function CTCommit(author, message, baseUrl) {
- this.author = author;
- this.message = message;
- this.revision = this._findRevision();
- this.summary = this._findSummary();
- this.url = this._url(baseUrl);
+function CTCommit() {}
+
+CTCommit.create = function(author, message, baseUrl, repository) {
+ var commit = new CTCommit();
+ commit.author = author;
+ commit.message = message;
+ commit.revision = commit._findRevision();
+ commit.summary = commit._findSummary();
+ commit.url = commit._url(baseUrl);
+ commit.repository = repository;
+ return commit;
+}
+
+// This is for cases where we can't get the commit data off the
+// repository for some reason.
+CTCommit.createIncomplete = function(baseUrl, revision, repository) {
+ var commit = new CTCommit();
+ commit.revision = revision;
+ commit.url = commit._url(baseUrl);
+ commit.repository = repository;
+ return commit;
}
CTCommit.prototype._url = function(baseUrl) {
- return baseUrl + '?' + Object.toQueryString({
- view: 'rev',
- revision: this.revision,
- });
+ return baseUrl.assign({revision: this.revision});
}
CTCommit.prototype._findRevision = function() {
« 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