From b60a182ee0347265be4abf5f1b83a98f9ff27bfd Mon Sep 17 00:00:00 2001 From: bjubes Date: Wed, 15 Feb 2017 19:54:50 -0500 Subject: [PATCH] fix var name --- travisreport.js | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/travisreport.js b/travisreport.js index 475d3e0..8b20290 100644 --- a/travisreport.js +++ b/travisreport.js @@ -1,7 +1,6 @@ $(document).ready(function(){ - var travisUrl = $("td").find(".commit-build-statuses").last().find("a").attr("href"); - if (getTravisUrl == null) { + if (travisUrl == null) { console.log("TravisReport: No build found.") return; } @@ -33,17 +32,17 @@ $(document).ready(function(){ processData: false, success: function(data) { jsonResponse = data //JSON.parse(data); - console.log(data); - + console.log(data); + var failedBuild = false; for (var i = 0; i < jsonResponse['jobs'].length; i++) { console.log(data['jobs'][i]['config']['env'] + " | " + data['jobs'][i]['state']); travisData[i] = {job: data['jobs'][i]['config']['env'], state: data['jobs'][i]['state'], job_id: data["build"]["job_ids"][i], allow_failure: data["jobs"][i].allow_failure} - + if (data['jobs'][i]['state'] != "passed") { failedBuild = true; } - + } console.log(travisData); @@ -73,7 +72,7 @@ $(document).ready(function(){ } //anything beyond this has no access to ajax response. }); - + $('.tr-link').click(function() { var href = $(this).attr("href"); if(href) { @@ -117,13 +116,13 @@ function badge(status) { function outerHTML(message) { return `
- TravisReport + TravisReport
Travis Report
- Travis Report + Travis Report
@@ -134,11 +133,3 @@ function outerHTML(message) {
`; } - - - - - - - -