|
|
@ -12,16 +12,18 @@ var settings = require('../settings'); |
|
|
|
var codePostfix = ""; |
|
|
|
var codePostfix = ""; |
|
|
|
|
|
|
|
|
|
|
|
var notifyStatus = function (options, callback) { |
|
|
|
var notifyStatus = function (options, callback) { |
|
|
|
settings.createGithub(options.owner).statuses.create({ |
|
|
|
var status = { |
|
|
|
user: options.owner, |
|
|
|
user: options.owner, |
|
|
|
repo: options.reponame, |
|
|
|
repo: options.reponame, |
|
|
|
sha: options.hash, |
|
|
|
sha: options.hash, |
|
|
|
state: options.state, |
|
|
|
state: options.state, |
|
|
|
target_url: settings.siteRoot + "status/" + options.owner + "/" + options.reponame + "/" + options.hash, |
|
|
|
target_url: settings.siteRoot + "status/" + options.owner + "/" + options.reponame + "/" + options.hash, |
|
|
|
description: ((options.description || "") + "").substr(0, 140) |
|
|
|
description: ((options.description || "") + "").substr(0, 140) |
|
|
|
}, function (err, result) { |
|
|
|
}; |
|
|
|
|
|
|
|
settings.createGithub(options.owner).statuses.create(status, function (err, result) { |
|
|
|
if (err) { |
|
|
|
if (err) { |
|
|
|
console.log("Error while creating status: " + err); |
|
|
|
console.log("Error while creating status: " + err); |
|
|
|
|
|
|
|
console.log(status); |
|
|
|
return callback(err); |
|
|
|
return callback(err); |
|
|
|
} |
|
|
|
} |
|
|
|
return callback(); |
|
|
|
return callback(); |
|
|
|