Closed swain closed 3 years ago
Yes! The latest Probot ships with new APIs that should make it easier to use in serverless/function environments. This is how the APIs look like:
https://probot.github.io/docs/serverless-deployment/#deploy-the-app
What that work for you?
The timing of your question is great! I'm looking for someone to help create an example repository for an AWS Lambda deployment, similar to https://github.com/probot/example-google-cloud-function. Would you like to help with that? I wonder what the most minimal setup would be to (continuously) deploy a Probot app function to AWS Lambda. I wonder if we need the serverless framework or if there is a simpler way without the extra tooling?
ProbotGitHub Apps to automate and improve your workflow
GitHubProbot & Google Cloud Functions example. Contribute to probot/example-google-cloud-function development by creating an account on GitHub.
It will be possible via https://github.com/probot/adapter-aws-lambda-serverless/pull/59
using environment variables:
const { createLambdaFunction, createProbot } = require("@probot/adapter-aws-lambda-serverless");
const appFn = require("./");
module.exports.webhooks = createLambdaFunction(appFn, { probot: createProbot() });
programmatic
const { createLambdaFunction, Probot } = require("@probot/adapter-aws-lambda-serverless");
const appFn = require("./");
module.exports.webhooks = createLambdaFunction(appFn, {
probot: new Probot({
// pass whatever options you like
appId,
privateKey,
secret,
})
});
:tada: This issue has been resolved in version 2.0.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Is there any plan to support providing GitHub credential information (
APP_ID
,WEBHOOK_SECRET
,PRIVATE_KEY
) without environment variables?For example, something like:
Thanks!