chore: update github client
This commit is contained in:
parent
14618c81c9
commit
9a51b0271d
@ -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",
|
||||||
|
@ -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)
|
||||||
|
@ -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)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user