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
Nitro example #1964
Comments
So you are instantiating a Probot instance for each http request? |
Yes, Nitro is designed to also work on many serverless platforms, where this has to happen. I'm planning to optimize this for non-serverless platforms though (If possible) |
Can we have a chat on twitter? |
I just benchmarked this. It's extremely fast: https://gist.github.com/AaronDewes/3e95469b27a1822326e6230c988b59d4
|
I don't know Nitro, but if its deployed to something like lamda, I think it would make sense to instantiate probot outside of the function so the instance is reused while the function is in hot cache? Like here: https://github.com/wip/app/blob/f325a681379b34c9ccf0f1a35dedbd968e51c5aa/api/index.js#L4 |
I already did that 👍 |
Ah okay now I see it: https://github.com/AaronDewes/probot-nitro/blob/0ae12a0d9509abf3702870c5f561254e1fdacd35/utils/probot.ts#L6. Like magic ✨ So yeah, in that case, I'd say that's standard usage of Probot in a serverless environment 👍 Happy to move it to @probotbot and make it official. In fact I got the okay to make you both org maintainers so yay welcome |
We, Aaron and I, discussed on twitter on what the goal is, if we want to put more stuff into octokit or more stuff into probot. Currently it is not clear to me. One hand we want to put more into octokit like octokit/app, on the other we do not want to have special case handling of vercel in @octokit/webhooks..js But I proposed to @AaronDewes to implement two configuration options to @octokit/webhooks.js where you can pass two async functions, where the first parameter is the request. One of the functions returns the body as string, the other one returns the body as object. getBodyAsString getBodyAsObject. |
No, it can't, it uses a complete framework. |
@gr2m I got kicked from the org again (I assume by @entitlements 🙄) |
I think the GitHub security team uses this to track org access. Can you check with them? Alternatively, I can also send one of them a message too , but I think it's better if you contact them. |
Also, being kicked from the org also removed me from all repos again... |
I got kicked out from probot org also. |
ugh. I'm on it. |
@gr2m Any news on those Probot org invite issues? |
Me and @Uzlopak got invited by @entitlements, GitHub's official system for their orgs |
yep |
I created an example using https://nitro.unjs.io at https://github.com/AaronDewes/probot-nitro.
Can we move this to an official Probot repo, and also add it to create-probot-app and the docs?
I think it's a good, minimal framework to use Probot with, and it works in a lot of environments with 0 configuration.
I want to make sure everything is okay with providing such an example and also adding it to the docs before spending more time on it, so the current repo is a PoC.
The text was updated successfully, but these errors were encountered: