Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Probot v11 #59

Merged
merged 5 commits into from
Feb 10, 2021
Merged

feat: Probot v11 #59

merged 5 commits into from
Feb 10, 2021

Conversation

gr2m
Copy link
Contributor

@gr2m gr2m commented Feb 9, 2021

fixes #10
fixes #11
closes #24
fixes #25
fixes #36
fixes #39
fixes #54
fixes #58

BREAKING CHANGE: The package was renamed from @probot/serverless-lambda to @probot/adapter-aws-lambda-serverless for consistency with the other adapters

BREAKING CHANGE: Usage changed

Before

// handler.js
const { serverless } = require("@probot/serverless-lambda");
const appFn = require("./");
module.exports.probot = serverless(appFn);

After

const { createLambdaFunction, createProbot } = require("@probot/adapter-aws-lambda-serverless");
const appFn = require("./");
module.exports.webhooks = createLambdaFunction(appFn, { probot: createProbot() });

View rendered README.md

BREAKING CHANGE: The package was renamed from `@probot/serverless-lambda` to `@probot/adapter-aws-lambda-serverless` for consistency with the other adapters

BREAKING CHANGE: Usage changed

Before

```js
// handler.js
const { serverless } = require("@probot/serverless-lambda");
const appFn = require("./");
module.exports.probot = serverless(appFn);
```

After

```js
const { createLambdaFunction, createProbot } = require("@probot/adapter-aws-lambda-serverless");
const appFn = require("./");
module.exports.webhooks = createLambdaFunction(appFn, { probot: createProbot() });
```
@@ -1,54 +1,37 @@
{
"name": "@probot/serverless-lambda",
"name": "@probot/adapter-aws-lambda-serverless",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npm question: Does this mean the old name will disappear from registry? I mean, @probot/[email protected] won't exist anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not disappear, but it will be deprecated

test/fixtures/push.json Outdated Show resolved Hide resolved
// Ends function immediately after callback
context.callbackWaitsForEmptyEventLoop = false;

// this could will be simpler once we ship `verifyAndParse()`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏽

Copy link
Collaborator

@tcbyrd tcbyrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! I really like the ProbotExports pattern and the API for this.

lambda-function.js Outdated Show resolved Hide resolved

return {
statusCode: error.status || 500,
error: "ooops",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be more helpful? For example maybe point users at docs for Cloudwatch logs on how to debug?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how? By adding a "documentation_url" key to the response? I'll create a follow up issue for further discussion to unblock this PR for now

Co-authored-by: Tommy Byrd <[email protected]>
lambda-function.js Outdated Show resolved Hide resolved
@gr2m gr2m merged commit 84fd425 into master Feb 10, 2021
@gr2m gr2m deleted the probot-v11 branch February 10, 2021 19:06
@github-actions
Copy link

🎉 This PR is included in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment