Github user dblotsky commented on a diff in the pull request:

    https://github.com/apache/cordova-medic/pull/87#discussion_r59607150
  
    --- Diff: medic/medic-downloadlogs.js ---
    @@ -0,0 +1,80 @@
    +var path = require('path'),
    +    fs = require('fs'),
    +    https = require('https'),
    +    optimist = require('optimist');
    +    q = require('Q'),
    +    mkdirp = require('mkdirp')
    +    util = require('util');
    +
    +var SERVER = "https://ci.apache.org";;
    +var BUILDERS = ["cordova-windows-store8.1", "cordova-ios", 
"cordova-windows-phone8.1", "cordova-android-osx","cordova-android-win"];
    +//var BUILDERS = ["cordova-windows-store8.1"];
    +var STEPS = ["running-tests", "gathering-logs", "getting-test-results"];
    +
    +function downloadLogs(outputDir) {
    +    var counter = 0;
    +    var builderPromises = BUILDERS.map(function(builder) {
    +        //https://ci.apache.org/json/builders/cordova-ios/builds/_all
    +        var buildInfoFile = path.join(outputDir, builder + ".json");
    +        var buildInfoUrl = util.format("%s/json/builders/%s/builds/_all", 
SERVER, builder);
    +        return download(buildInfoUrl, buildInfoFile).then(function() {
    +            var buildInfo = JSON.parse(fs.readFileSync(buildInfoFile));
    +            var promises = [];
    +            for(var buildNumber in buildInfo) {
    +                var steps = buildInfo[buildNumber].steps.filter(
    +                    function(step) {
    +                        return STEPS.indexOf(step.name) !== -1 && 
step.logs && step.logs.length > 0;
    +                    });
    +                steps.forEach(function(step) {
    --- End diff --
    
    This anonymous function and the one above are done in different styles. 
Please format them to be consistent with the others in the file.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to