-
Notifications
You must be signed in to change notification settings - Fork 36
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
Make GET /probot
template more flexible
#53
Comments
Thank you for opening the issue! We are currently working on making Probot work better with serverless environments out of the box, see probot/probot#1286 (comment) The API will look something like this const { createLamdaMiddleware, createProbot } = require('@probot/lambda')
const myApp = require('../app')
module.export = createLamdaMiddleware(myApp, { probot: createProbot() }) Question: would you expect the returned middleware to handle the |
Hi @gr2m! Thanks for the prompt response.
This route is not really important to me or my organization, so removing it wouldn't bother me in the slightest! However, I think the biggest problem for us was the package's internal reliance on |
okay thanks for sharing these insights. So I think the solution will be to just remove the view by default, which is the case with the new serverless APIs. Okay to close this issue? |
@gr2m My notifications are messed up -- thanks for closing, and for addressing! |
@gr2m FWIW -- it looks like this issue is actually still present in the latest version of this package. I'm going to put up a PR with a more detailed description. |
As is, the behavior of the
GET /probot
HTML template is brittle and non-flexible:It relies on the presence of a
package
module inprocess.cwd()
at import time. This reliance seems unnecessary, and is also undocumented in theREADME
.This
require
statement is not compatible with webpack, which cannot handle a dynamic import like this.Thoughts on updating this behavior to be configurable, or swapping the
require
for a safer file read?The text was updated successfully, but these errors were encountered: