Skip to content

Commit 8ccd196

Browse files
author
dessant
committed
feat: update dependencies
BREAKING CHANGE: probot < 9.2.13 no longer supported.
1 parent 56f4043 commit 8ccd196

5 files changed

Lines changed: 1404 additions & 2026 deletions

File tree

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.12.0
1+
10.16.0

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,27 @@
1313
"scripts": {
1414
"start": "probot run ./src/index.js",
1515
"watch": "nodemon --exec 'yarn run start'",
16-
"update": "ncu --upgrade --upgradeAll && yarn",
16+
"update": "ncu --upgrade && yarn",
1717
"push": "git push --follow-tags origin master",
18-
"release": "standard-version && yarn run push"
18+
"release": "standard-version"
1919
},
2020
"files": [
2121
"docs",
2222
"src"
2323
],
2424
"dependencies": {
2525
"joi": "^14.3.1",
26-
"probot": "^7.5.0",
26+
"probot": "^9.2.13",
2727
"probot-config": "^1.0.1",
28-
"probot-messages": "^0.1.2",
28+
"probot-messages": "^1.0.1",
2929
"uuid": "^3.3.2"
3030
},
3131
"devDependencies": {
32-
"nodemon": "^1.18.9",
33-
"npm-check-updates": "^2.15.0",
34-
"prettier": "^1.16.0",
35-
"smee-client": "^1.0.2",
36-
"standard-version": "^4.4.0"
32+
"nodemon": "^1.19.1",
33+
"npm-check-updates": "^3.1.10",
34+
"prettier": "^1.18.2",
35+
"smee-client": "^1.1.0",
36+
"standard-version": "^6.0.1"
3737
},
3838
"engines": {
3939
"node": ">=8.12.0"

src/action.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ module.exports = class Action {
77

88
async action() {
99
const {payload, github} = this.context;
10-
const issue = this.context.issue();
10+
const issue = this.context.repo({
11+
issue_number: this.context.issue().number
12+
});
1113

1214
const {only} = this.config;
1315
const type = payload.issue ? 'issues' : 'pulls';
@@ -40,12 +42,12 @@ module.exports = class Action {
4042

4143
if (open && targetPayload.state === 'closed') {
4244
this.log.info(issue, 'Reopening');
43-
await github.issues.edit({...issue, state: 'open'});
45+
await github.issues.update({...issue, state: 'open'});
4446
}
4547

4648
if (close && targetPayload.state === 'open') {
4749
this.log.info(issue, 'Closing');
48-
await github.issues.edit({...issue, state: 'closed'});
50+
await github.issues.update({...issue, state: 'closed'});
4951
}
5052

5153
if (lock && !targetPayload.locked) {

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const schema = require('./schema');
77

88
module.exports = async robot => {
99
const github = await robot.auth();
10-
const appName = (await github.apps.get({})).data.name;
10+
const appName = (await github.apps.getAuthenticated()).data.name;
1111

1212
robot.on(
1313
[

0 commit comments

Comments
 (0)