-
Notifications
You must be signed in to change notification settings - Fork 36
Update to Probot 7 and add readme #2
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, this looks great! Left one tiny note, but feel free to 🚢 without it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I left comments about some small doc clarifications :)
## Differences from `probot run` | ||
|
||
#### Local Development | ||
Since Lambda functions do not start a normal node process, the best way we've found to test this out locally is to use [`serverless-offline`](https://github.com/dherault/serverless-offline). This plugin for the serverless framework emulates AWS Lambda and API Gateway on your local machine, allowing you to continue working from `https://localhost:3000/probot` before deploying your function to AWS. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How to you actually use this plugin? Is there anything needed that's specific to probot?
README.md
Outdated
Since Lambda functions do not start a normal node process, the best way we've found to test this out locally is to use [`serverless-offline`](https://github.com/dherault/serverless-offline). This plugin for the serverless framework emulates AWS Lambda and API Gateway on your local machine, allowing you to continue working from `https://localhost:3000/probot` before deploying your function to AWS. | ||
|
||
#### Long running tasks | ||
Some Probot Apps that depend on long running processes or intervals will not work with this extension. This is due to the inherent architecture of serverless functions, which are designed to respond to events and stop running as quickly as possible. For longer running apps we recommend using other deployment options such as [Glitch](https://probot.github.io/docs/deployment/#glitch) or [Now](https://probot.github.io/docs/deployment/#now). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe instead of just calling out these 2 we could just link to https://probot.github.io/docs/deployment ?
Running through this as well. Is @probot/serverless-lambda already up on npm? If not, are there plans on making I would love to pick up where this leaves off and write a brief guide leveraging this README, I am just not sure where to start to make this work. @tcbyrd How were you testings this in the call last week? Do you have a link to your working repo that uses? |
Not yet. Someone setup the Probot scope/org already on NPM and we're not in it. Need to figure out who set it up. Otherwise I'd probably just publish it as I have an example here: https://github.com/tcbyrd/invite-koa/blob/developing/index.js, but until it's published on NPM you can do If you're using a probot:
handler: index.handler
environment:
WEBHOOK_SECRET: ${file(config/config.${self:provider.stage}.json):WEBHOOK_SECRET}
APP_ID: ${file(config/config.${self:provider.stage}.json):APP_ID}
LOG_FORMAT: ${file(config/config.${self:provider.stage}.json):LOG_FORMAT}
events:
- http:
path: /probot
method: post You don't have to use the
|
Here's an initial pass at the README for this. It's not intended to be a full primer on "how to serverless", but I do provide a few links to other resources. I think we can add more general info in our docs and link to that here as well, since some of the details will be the same between the various providers.
Feel free to edit. My brain isn't writing well today, so I'm sure some things may not be clear.