Skip to content

Commit 71dacdd

Browse files
committed
chore: updated github npm dependency v0.x -> v2.x.
Includes minor fixes in existing code due to breaking changes in the github dependency.
1 parent 812b296 commit 71dacdd

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

lib/node-repo.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ function updatePrWithLabels (options, labels) {
3232

3333
const mergedLabels = labels.concat(existingLabels)
3434

35-
githubClient.issues.edit({
35+
githubClient.issues.addLabels({
3636
user: options.owner,
3737
repo: options.repo,
3838
number: options.prId,
39-
labels: mergedLabels
39+
body: mergedLabels
4040
}, (err) => {
4141
if (err) {
4242
return options.logger.error(err, 'Error while editing issue to add labels')

lib/pollTravis.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ function pollTravisBuildBySha (options, checkNumber = 1) {
9494

9595
function createGhStatusFn (options) {
9696
return (state, travisId, message) => {
97-
githubClient.statuses.create({
97+
githubClient.repos.createStatus({
9898
user: options.owner,
9999
repo: options.repo,
100100
sha: options.lastCommit.sha,

lib/push-jenkins-update.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function findLatestCommitInPr (options, cb) {
8080
}
8181

8282
function createGhStatus (options, logger) {
83-
githubClient.statuses.create({
83+
githubClient.repos.createStatus({
8484
user: options.owner,
8585
repo: options.repo,
8686
sha: options.sha,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"debug": "^2.2.0",
2121
"dotenv": "^2.0.0",
2222
"express": "^4.13.4",
23-
"github": "^0.2.4",
23+
"github": "^2.5.2",
2424
"glob": "^7.0.3",
2525
"travis-ci": "^2.1.0"
2626
},

0 commit comments

Comments
 (0)