Skip to content

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 8, 2019
1 parent 56f4043 commit 8ccd196
Show file tree
Hide file tree
Showing 5 changed files with 1,404 additions and 2,026 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
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,27 @@
"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": {
"joi": "^14.3.1",
"probot": "^7.5.0",
"probot": "^9.2.13",
"probot-config": "^1.0.1",
"probot-messages": "^0.1.2",
"probot-messages": "^1.0.1",
"uuid": "^3.3.2"
},
"devDependencies": {
"nodemon": "^1.18.9",
"npm-check-updates": "^2.15.0",
"prettier": "^1.16.0",
"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
8 changes: 5 additions & 3 deletions src/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ module.exports = class Action {

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

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

if (open && targetPayload.state === 'closed') {
this.log.info(issue, 'Reopening');
await github.issues.edit({...issue, state: 'open'});
await github.issues.update({...issue, state: 'open'});
}

if (close && targetPayload.state === 'open') {
this.log.info(issue, 'Closing');
await github.issues.edit({...issue, state: 'closed'});
await github.issues.update({...issue, state: 'closed'});
}

if (lock && !targetPayload.locked) {
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const schema = require('./schema');

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

robot.on(
[
Expand Down
Loading

0 comments on commit 8ccd196

Please sign in to comment.