Skip to content

Commit

Permalink
Additional logging
Browse files Browse the repository at this point in the history
  • Loading branch information
oliversalzburg committed Jul 19, 2016
1 parent a1b41b0 commit ea439aa
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/webapp.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
var _ = require('lodash');
var api = require('./api');
var async = require('async');
var util = require('util');
var webhooks = require('./webhooks');
var debug = require('debug')('strider-gitlab:webapp');
var hostname = process.env.strider_server_name || 'http://localhost:3000';
var util = require('util');
var webhooks = require('./webhooks');

module.exports = {

Expand Down Expand Up @@ -48,7 +48,7 @@ module.exports = {
var uri = util.format('projects/%d/repository/blobs/%s?filepath=%s', repoId, branch, encodedFileName);

api.get(account, uri, function (err, data, res) {
if(err) {
if (err) {
return done(err, null);
} else {
done(err, res.text);
Expand Down Expand Up @@ -111,9 +111,11 @@ module.exports = {
// Create webhooks and add deploykey
return async.parallel([
function (callback) {
debug('Creating webhooks...');
api.createHooks(account, project.provider.repo_id, url, callback);
},
function (callback) {
debug('Adding deployment keys...');
api.addDeployKey(account, project.provider.repo_id, deploy_key_title, project.branches[0].pubkey, callback);
}
], function (err) {
Expand Down

0 comments on commit ea439aa

Please sign in to comment.