stuff
This commit is contained in:
parent
290b1f1fef
commit
0fba8f8fbe
@ -11,19 +11,19 @@ var install_dir = '/var/www/gitwrapper/'
|
||||
var calls = {
|
||||
create: function(req, res, name, sshURL){
|
||||
return exec('bash /var/www/gitdeploy/create.sh '+name+' '+sshURL, function(err, stdout, stderr){
|
||||
console.log(err, stdout, stderr);
|
||||
|
||||
return res.json({ title: 'Express' });
|
||||
});
|
||||
},
|
||||
update: function(req, res, name, sshURL){
|
||||
return exec('bash /var/www/gitdeploy/update.sh '+name+' '+sshURL, function(err, stdout, stderr){
|
||||
console.log(err, stdout, stderr);
|
||||
|
||||
return res.json({ title: 'Express' });
|
||||
});
|
||||
},
|
||||
delete: function(req, res, name, sshURL){
|
||||
return exec('bash /var/www/gitdeploy/delete.sh '+name+' '+sshURL, function(err, stdout, stderr){
|
||||
console.log(err, stdout, stderr);
|
||||
|
||||
return res.json({ title: 'Express' });
|
||||
});
|
||||
}
|
||||
@ -33,7 +33,9 @@ var calls = {
|
||||
|
||||
router.all('/', function(req, res, next) {
|
||||
var event = req.headers['x-github-event'];
|
||||
var call = (req.body.created && 'create') || (req.body.deleted && 'delete') || 'update';
|
||||
var call = (req.body.created && 'create') ||
|
||||
(req.body.deleted && 'delete') ||
|
||||
'update';
|
||||
|
||||
var name = req.body.ref.replace('refs/heads/', '');
|
||||
var sshURL = req.body.repository.ssh_url;
|
||||
|
Loading…
x
Reference in New Issue
Block a user