chore: update github client

This commit is contained in:
Christoph Witzko 2016-11-28 16:25:54 +01:00
parent 14618c81c9
commit 9a51b0271d
3 changed files with 4 additions and 5 deletions

View File

@ -20,7 +20,7 @@
"@semantic-release/last-release-npm": "^1.2.1", "@semantic-release/last-release-npm": "^1.2.1",
"@semantic-release/release-notes-generator": "^2.0.0", "@semantic-release/release-notes-generator": "^2.0.0",
"git-head": "^1.2.1", "git-head": "^1.2.1",
"github": "^0.2.4", "github": "^6.1.0",
"lodash": "^4.0.0", "lodash": "^4.0.0",
"nerf-dart": "^1.0.0", "nerf-dart": "^1.0.0",
"nopt": "^3.0.3", "nopt": "^3.0.3",

View File

@ -11,7 +11,6 @@ module.exports = function (config, cb) {
var ghConfig = options.githubUrl ? url.parse(options.githubUrl) : {} var ghConfig = options.githubUrl ? url.parse(options.githubUrl) : {}
var github = new GitHubApi({ var github = new GitHubApi({
version: '3.0.0',
port: ghConfig.port, port: ghConfig.port,
protocol: (ghConfig.protocol || '').split(':')[0] || null, protocol: (ghConfig.protocol || '').split(':')[0] || null,
host: ghConfig.hostname, host: ghConfig.hostname,
@ -40,11 +39,11 @@ module.exports = function (config, cb) {
} }
github.authenticate({ github.authenticate({
type: 'oauth', type: 'token',
token: options.githubToken token: options.githubToken
}) })
github.releases.createRelease(release, function (err) { github.repos.createRelease(release, function (err) {
if (err) return cb(err) if (err) return cb(err)
cb(null, true, release) cb(null, true, release)

View File

@ -3,7 +3,7 @@ module.exports = function () {
authenticate: function () { authenticate: function () {
return true return true
}, },
releases: { repos: {
createRelease: function (release, cb) { createRelease: function (release, cb) {
cb(null) cb(null)
} }