Skip to content

Commit

Permalink
fix var name
Browse files Browse the repository at this point in the history
  • Loading branch information
bjubes committed Feb 16, 2017
1 parent e369839 commit b60a182
Showing 1 changed file with 8 additions and 17 deletions.
25 changes: 8 additions & 17 deletions travisreport.js
Original file line number Diff line number Diff line change
@@ -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;
}
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -117,13 +116,13 @@ function badge(status) {
function outerHTML(message) {
return `
<div class="timeline-comment-wrapper">
<img alt="TravisReport" class="timeline-comment-avatar" height="44" src="https://raw.githubusercontent.com/bjubes/travis-report/master/images/icon.png" width="44">
<img alt="TravisReport" class="timeline-comment-avatar" height="44" src="https://raw.githubusercontent.com/bjubes/travis-report/master/images/icon.png" width="44">
<div class="branch-action-body simple-box markdown-body comment timeline-comment timeline-new-comment">
<div class="timeline-comment-header travis-report-header" style="margin-top: -15px !important;">
<span class="timeline-comment-label tooltipped tooltipped-multiline tooltipped-s" aria-label="I am a robot. Bee Boop.">Travis Report</span>
<div class="timeline-comment-header-text">
<strong>
Travis Report
Travis Report
</strong>
</div>
</div>
Expand All @@ -134,11 +133,3 @@ function outerHTML(message) {
</div>
`;
}








0 comments on commit b60a182

Please sign in to comment.