Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @param {import('probot').Probot} app
*/
module.exports = (app) => {
export default (app) => {
app.log.info("Yay! The app was loaded!");

app.on("issues.opened", async (context) => {
Expand Down
6 changes: 3 additions & 3 deletions netlify/functions/webhooks.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { createProbot } = require("probot");
const app = require("../../app");
import { createProbot } from "probot";
import app from "../../app.js";

const probot = createProbot();
const loadingApp = probot.load(app);
Expand All @@ -10,7 +10,7 @@ const loadingApp = probot.load(app);
* @param {import("@netlify/functions").HandlerEvent} event
* @param {import("@netlify/functions").HandlerContext} context
*/
exports.handler = async function (event, context) {
export const handler = async function (event, context) {
try {
await loadingApp;

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"private": true,
"description": "Probot & Netlify Functions example",
"main": "app.js",
"type": "module",
"scripts": {
"start": "probot run ./app.js",
"test": "node test.js"
Expand Down
10 changes: 5 additions & 5 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
const { suite } = require("uvu");
const assert = require("uvu/assert");
import { suite } from "uvu";
import * as assert from "uvu/assert";

const nock = require("nock");
import nock from "nock";
nock.disableNetConnect();

const { Probot, ProbotOctokit } = require("probot");
import { Probot, ProbotOctokit } from "probot";

const app = require("./app");
import app from "./app.js";

/** @type {import('probot').Probot */
let probot;
Expand Down