mirror of
https://github.com/dessant/label-actions.git
synced 2026-03-13 01:27:03 -04:00
feat: update dependencies
BREAKING CHANGE: probot < 9.2.13 no longer supported.
This commit is contained in:
18
package.json
18
package.json
@@ -13,9 +13,9 @@
|
||||
"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",
|
||||
@@ -23,17 +23,17 @@
|
||||
],
|
||||
"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"
|
||||
|
||||
@@ -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';
|
||||
@@ -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) {
|
||||
|
||||
@@ -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(
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user