Skip to content

Commit

Permalink
fix groovecoder#52 added log messages for parsed files and commits
Browse files Browse the repository at this point in the history
  • Loading branch information
federicoculloca committed Jun 24, 2015
1 parent 6c9601e commit 0b142a4
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions commenter.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var comment = function(request, response) {
response.status(200).send('ok');

// We only support pull requests at this time
if(request.headers['x-github-event'] !== 'pull_request') return;
if (request.headers['x-github-event'] !== 'pull_request') return;

// TODO: Only acknowledge pushes to the "Master" branch.
console.log('Repo: ' + payload.repository.full_name);
Expand Down Expand Up @@ -64,6 +64,7 @@ var comment = function(request, response) {
var commitFiles = commitMeta.files;
var commitSHA = commitMeta.sha;
parseCSS(commitFiles, config, commentURL, token, function(usageInfo) {}, commitSHA);
console.log('Checked commit ' + commitSHA);
});
});
});
Expand All @@ -79,6 +80,7 @@ var parseCSS = function(files, config, commentURL, token, cb, sha) {
};
if (path.extname(file.filename) === '.styl') {
parseSource.stylus(file, config, addFeature);
console.log('Parsed ' + file.filename);
}
if (path.extname(file.filename) === '.css') {
var rawURL = file.raw_url;
Expand All @@ -94,9 +96,9 @@ var parseCSS = function(files, config, commentURL, token, cb, sha) {
onFeatureUsage: addFeature
})).process(contents, {
from: '/' + file.filename
}).then(function(response) {
});
}).then(function(response) {});
});
console.log('Parsed ' + file.filename);
}
});
};
Expand All @@ -116,7 +118,9 @@ var renderComment = function(url, file, comment, position, token, sha) {
position: position
})
}, function(error, response, body) {
console.error(error);
console.error('Error rendering comment: ' + error);
console.error('Response: ' + response);
console.error('Body: ' + body);
});
};

Expand Down

0 comments on commit 0b142a4

Please sign in to comment.