Skip to content
This repository has been archived by the owner on Jul 3, 2021. It is now read-only.

Commit

Permalink
feat: update dependencies
Browse files Browse the repository at this point in the history
BREAKING CHANGE: probot < 9.2.13 no longer supported.
  • Loading branch information
dessant committed Jun 9, 2019
1 parent 025ef4e commit 1b0d617
Show file tree
Hide file tree
Showing 5 changed files with 2,325 additions and 2,310 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.12.0
10.16.0
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,30 @@
"scripts": {
"start": "probot run ./src/index.js",
"watch": "nodemon --exec 'yarn run start'",
"update": "ncu --upgrade --upgradeAll && yarn",
"update": "ncu --upgrade && yarn",
"push": "git push --follow-tags origin master",
"release": "standard-version && yarn run push"
"release": "standard-version"
},
"files": [
"docs",
"src"
],
"dependencies": {
"dedent": "^0.7.0",
"firebase-admin": "^6.5.0",
"firebase-admin": "^8.0.0",
"joi": "^14.3.1",
"probot": "^7.5.0",
"probot": "^9.2.13",
"probot-config": "^1.0.1",
"probot-messages": "^0.1.2",
"probot-scheduler": "probot/scheduler#75bc5dd3fcac5bf6448ce85c63d1e5c2971c11a8",
"probot-messages": "^1.0.1",
"probot-scheduler": "^2.0.0-beta.1",
"uuid": "^3.3.2"
},
"devDependencies": {
"nodemon": "1.18.9",
"npm-check-updates": "^2.15.0",
"prettier": "^1.15.3",
"smee-client": "^1.0.2",
"standard-version": "^4.4.0"
"nodemon": "1.19.1",
"npm-check-updates": "^3.1.10",
"prettier": "^1.18.2",
"smee-client": "^1.1.0",
"standard-version": "^6.0.1"
},
"engines": {
"node": ">=8.12.0"
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = async robot => {
const db = firebaseApp.database();

const github = await robot.auth();
const appName = (await github.apps.get({})).data.name;
const appName = (await github.apps.getAuthenticated()).data.name;

const scheduler = createScheduler(robot);

Expand Down
14 changes: 8 additions & 6 deletions src/reaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ module.exports = class Reaction {

async comment() {
const {isBot, payload, github} = this.context;
const issue = this.context.issue();
const issue = this.context.repo({
issue_number: this.context.issue().number
});

if (isBot) {
return;
Expand Down Expand Up @@ -62,7 +64,7 @@ module.exports = class Reaction {
};

let reactionComment = this.getConfigValue(type, 'reactionComment');
const GhResource = isReviewComment ? github.pullRequests : github.issues;
const GhResource = isReviewComment ? github.pulls : github.issues;

if (!reactionComment) {
this.log.info({issue, commentId}, 'Deleting comment');
Expand Down Expand Up @@ -95,7 +97,7 @@ module.exports = class Reaction {

this.log.info({issue, commentId}, 'Editing comment');
await this.ensureUnlock(issue, lock, () =>
GhResource.editComment({...commentParams, body: editedComment})
GhResource.updateComment({...commentParams, body: editedComment})
);

await this.getStorage(
Expand All @@ -104,7 +106,7 @@ module.exports = class Reaction {
dt: Date.now(),
isReviewComment,
commentId,
issue: issue.number
issue: issue.issue_number
});
}

Expand Down Expand Up @@ -136,7 +138,7 @@ module.exports = class Reaction {
comment_id: comment.commentId
};
const GhResource = comment.isReviewComment
? github.pullRequests
? github.pulls
: github.issues;

let commentData;
Expand All @@ -150,7 +152,7 @@ module.exports = class Reaction {
}
const commentBody = commentData.body;
if (/<!--notice-->/.test(commentBody) || reactionRx.test(commentBody)) {
const issue = {owner, repo, number: comment.issue};
const issue = {owner, repo, issue_number: comment.issue};
const {data: issueData} = await github.issues.get({
...issue,
headers: {
Expand Down
Loading

0 comments on commit 1b0d617

Please sign in to comment.