Skip to content
Open
Show file tree
Hide file tree
Changes from 7 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
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ name: Release
- next
- beta
- "*.x"

# These are recommended by the semantic-release docs: https://github.com/semantic-release/npm#npm-provenance
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance

jobs:
release:
name: release
Expand Down
7 changes: 3 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
const ProbotExports = require("probot");
const lambdaFunction = require("./lambda-function");
import lambdaFunction from "./lambda-function";

module.exports = { ...ProbotExports, createLambdaFunction };
export * from "probot";

/**
*
* @param {import('probot').ApplicationFunction} app
* @param { { probot: import('probot').Probot } } options
*/
function createLambdaFunction(app, { probot }) {
export function createLambdaFunction(app, { probot }) {
// load app once outside of the function to prevent double
// event handlers in case of container reuse
probot.load(app);
Expand Down
6 changes: 3 additions & 3 deletions lambda-function.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = lambdaFunction;
export default lambdaFunction;

const lowercaseKeys = require("lowercase-keys");
const { template } = require("./views/probot");
import lowercaseKeys from "lowercase-keys";
import { template } from "./views/probot.js";

async function lambdaFunction(probot, event, context) {
if (event.httpMethod === "GET" && event.path === "/probot") {
Expand Down
Loading