probot / adapter-aws-lambda-serverless

An extension for running Probot on Lambda
ISC License
93 stars 36 forks source link

feat: Support Probot v13 #128

Closed Oatelaus closed 2 months ago

Oatelaus commented 2 months ago

This PR updates Probot to v13 and replaces nock with fetch-mock.

When attempting to use this package with other packages including functionality built around newer webhook events I came across issues with mismatching @octokit/webhooks-types (or just @octokit/wehooks)

As per https://github.com/octokit/core.js/issues/551 it is recommended to capture outgoing fetch requests using fetch-mock over nock.

I have dropped out the dependency for @probot/get-private-key as this is not directly used within this package anymore.

Oatelaus commented 2 months ago

@gr2m if you have a moment could you have a peak at this? 🙏

gr2m commented 2 months ago

Hmm I'm okay with dropping the tests for node 14 & 16 and test in 20 and 22 instead

Do you know what node version lambda is using?

Oatelaus commented 2 months ago

@gr2m judging by https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html it looks like:

20 - No Planned Deprecation 18 - No Planned Deprecation 16 - Jun 12, 2024

I would need to look into the specifics to get 16 to work or would you prefer to go with just 18 & 20?

Lambda runtimes - AWS Lambda
Learn about the languages that Lambda supports through runtimes.
gr2m commented 2 months ago

great, thanks for checking! Can you update the test matrix as part of this PR?

https://github.com/probot/adapter-aws-lambda-serverless/blob/1eb30a0ce109a41b83412d35424de10af2a6e05a/.github/workflows/test.yml#L15-L17

Oatelaus commented 2 months ago

Thanks for the advice @gr2m I've done that!

Looks like Probot has dropped support for anything below 18 https://github.com/probot/probot/commit/948a1b7147618966dc0752b59e9b29c5639ac853

I realise I haven't tested in 22, I left it out because it's not a supported AWS version, however I see sense in adding it in as a future proofing mechanism.

gr2m commented 2 months ago

I realise I haven't tested in 22, I left it out because it's not a supported AWS version, however I see sense in adding it in as a future proofing mechanism.

That's okay, we can add it later

github-actions[bot] commented 2 months ago

:tada: This PR is included in version 4.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: