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

When to expect a release that supports Probot v12? #82

Closed
jaylenw opened this issue Nov 5, 2021 · 3 comments · Fixed by #83
Closed

When to expect a release that supports Probot v12? #82

jaylenw opened this issue Nov 5, 2021 · 3 comments · Fixed by #83
Labels

Comments

@jaylenw
Copy link
Contributor

jaylenw commented Nov 5, 2021

Background Info

I have a Probot application running Probot major version 11.4.1 that depends on this AWS Lambda Serverless adapter. I upgraded this adapter to v2.1.0 in my Probot application. I also understand that the v2.1.0 release had type definitions added seen here which is excellent. I then proceeded to upgrade my Probot application to the latest release version which is v12.1.1.

Problem

I am now unable to build my Probot application with TypeScript as I understand that the current latest release of this adapter does not support Probot v12. You can see below that I am encountering a type mismatch:

src/handler.ts(12,48): error TS2345: Argument of type '(app: Probot) => void' is not assignable to parameter of type 'ApplicationFunction'.
  Types of parameters 'app' and 'app' are incompatible.
    Type 'import("/home/user/WorkSpace/GitHub/myapp/node_modules/@probot/adapter-aws-lambda-serverless/node_modules/probot/lib/probot").Probot' is not assignable to type 'import("/home/user/WorkSpace/GitHub/myapp/node_modules/probot/lib/probot").Probot'.
      The types returned by 'webhooks.sign(...)' are incompatible between these types.
        Type 'string' is not assignable to type 'Promise<string>'.

Please note I am using almost the exact same code that is currently on the README that should be in handler.js / handler.ts.

The key string to notice is Type 'string' is not assignable to type 'Promise<string>'. This is the result to the changes made to Probot v12, if I understood correctly, the octokit webhooks has been changed (see here for the diff with some test cases reflecting this relating to "x-hub-signature": sign("secret", body), and "x-hub-signature-256": await sign("secret", body),.

Question

Long story short, when may we expect a new major version for this adapter to support Probot v12? I am thinking at minimum the Probot version in the package.json file will need to be set to v12 and that should update the type definitions.

I thank all of the contributors for their hard work on the project! 👍🏽

@gr2m
Copy link
Contributor

gr2m commented Nov 7, 2021

A pull request would be most welcome 😁 I can help review and merge a PR and release a new version, but I cannot do the work myself. I'm not very familiar with AWS Lamda / serverless myself anyway, it would be good to find a maintainer willing to help with that adapter in particular

@jaylenw
Copy link
Contributor Author

jaylenw commented Nov 8, 2021

Hello @gr2m , I will see what my team and I can do in providing a pull request soon! Will keep you updated. Thank you.

@github-actions
Copy link

github-actions bot commented Nov 9, 2021

🎉 This issue has been resolved in version 3.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
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants