Skip to content

Commit

Permalink
Merge branch 'master' of github.com:arturadib/botio
Browse files Browse the repository at this point in the history
  • Loading branch information
arturadib committed Jun 22, 2012
2 parents cd99483 + 4f08554 commit 1a11c94
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function cloneAndMerge() {
}

execWrap('git clone '+jobInfo.base_url+' .'); // clone upstream
execWrap('git checkout master'); // ensure we're on master
execWrap('git checkout '+jobInfo.base_ref); // checkout the base ref in the pull request
execWrap('git remote add requester '+jobInfo.head_url); // add pull requester's repo
execWrap('git fetch requester '+jobInfo.head_ref); // fetch only PR branch
execWrap('git branch PR '+jobInfo.head_sha); // this is so we can merge the given SHA below
Expand Down Expand Up @@ -130,7 +130,7 @@ for (key in jobInfo)

// message()
exports.message = function(msg) {
if (!msg)
if (!msg)
msg = '';
console.log('!botio_message:'+msg);
}
7 changes: 4 additions & 3 deletions lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function postComment(obj, callback) {
obj.body = obj.body;

request.post({
url: url,
url: url,
json: {
body: '#### From: '+config.name+'\n\n'+
'----\n\n'+
Expand Down Expand Up @@ -128,9 +128,9 @@ function runJob(jobInfo, callback) {
debug('Running command line:', commandLine);

var t0 = Date.now();
child.exec(commandLine, {
child.exec(commandLine, {
timeout: (config.script_timeout || 3600)*1000,
env: common.extend(process.env, {
env: common.extend(process.env, {
BOTIO_JOBINFO: JSON.stringify(jobInfo),
BOTIO_MODULE: __dirname+'/module.js'
}),
Expand Down Expand Up @@ -303,6 +303,7 @@ app.post('/', function(req, res) {
public_dir: path.resolve(config.public_dir+'/'+id),
public_url: 'http://'+config.host+':'+config.port+'/'+id,
base_url: 'git://github.com/'+config.repo+'.git',
base_ref: pull.base.ref,
head_url: pull.head.repo.git_url,
head_ref: pull.head.ref,
head_sha: pull.head.sha,
Expand Down

0 comments on commit 1a11c94

Please sign in to comment.