Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version: 22.x
- name: Install dependencies
run: npm install
- name: Lint files
Expand All @@ -25,14 +25,14 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node: [16.x]
node: [22.x]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: npm install
- name: Run tests
run: npm run test
run: npm test
16,862 changes: 7,288 additions & 9,574 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@
"*.js": "eslint --fix"
},
"dependencies": {
"moment": "^2.29.4",
"moment-timezone": "^0.5.35",
"probot": "^7.4.0",
"probot-scheduler": "^1.0.3"
"moment": "^2.30.1",
"moment-timezone": "^0.5.46",
"probot": "^13.4.1"
},
"devDependencies": {
"@octokit/rest": "^21.0.2",
"eslint": "^8.55.0",
"eslint-config-eslint": "^9.0.0",
"fetch-mock": "^12.2.0",
"globals": "^13.24.0",
"jest": "^26.1.0",
"jest": "^29.7.0",
"lint-staged": "^13.2.1",
"nock": "^10.0.2",
"yorkie": "^2.0.0"
},
"keywords": [
Expand All @@ -55,6 +55,6 @@
"testEnvironment": "node"
},
"engines": {
"node": "16.x"
"node": "22.x"
}
}
34 changes: 24 additions & 10 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,25 @@

"use strict";

const probot = require("probot");
//-----------------------------------------------------------------------------
// Requirements
//-----------------------------------------------------------------------------

const { Probot, run } = require("probot");
const plugins = require("./plugins");

//-----------------------------------------------------------------------------
// Type Definitions
//-----------------------------------------------------------------------------

/** @typedef {import("probot").Probot} Probot */
/** @typedef {import("probot").Context<any>} ProbotContext */
/** @typedef {import("probot").ProbotOctokit} ProbotOctokit */

//-----------------------------------------------------------------------------
// Main
//-----------------------------------------------------------------------------

if (!process.env.SECRET) {
throw new Error("Missing 'SECRET' environment variable");
}
Expand All @@ -21,17 +37,15 @@ if (!process.env.APP_ID) {
}

const port = process.env.PORT || 8000;
const bot = probot.createProbot({
port,
const app = new Probot({
privateKey: process.env.PRIVATE_KEY,
appId: process.env.APP_ID,
secret: process.env.SECRET,
cert: process.env.PRIVATE_KEY,
id: process.env.APP_ID
port
});

const enabledPlugins = new Set([
"addToTriageProject",
"autoCloser",
"commitMessage",
"issueArchiver",
"needsInfo",
"recurringIssues",
"releaseMonitor",
Expand All @@ -41,7 +55,7 @@ const enabledPlugins = new Set([
// load all the enabled plugins from inside plugins folder
Object.keys(plugins)
.filter(pluginId => enabledPlugins.has(pluginId))
.forEach(pluginId => bot.load(plugins[pluginId]));
.forEach(pluginId => app.load(plugins[pluginId]));

// start the server
bot.start();
run(app);
218 changes: 0 additions & 218 deletions src/plugins/auto-closer/index.js

This file was deleted.

Loading
Loading