Git Product home page Git Product logo

Comments (2)

rclark avatar rclark commented on June 17, 2024 1

This implementation accepts the webhook from Github, validates that it came from github, and then forwards the event to your lambda function via SNS message. The problem is that there's a limit on the acceptable size of an SNS message, and Github messages for particularly gnarly commits / prs can surpass that limit.

There's also a PR #2 that would do nothing more than set up the API gateway resources and send the webhooks directly to your lambda function. Downside there is that the authentication isn't done for you.

One approach to consider:

  • Make this library module.exports a function for validating the payload from the webhook
  • Merge #2
  • If you want to listen to non-push events, you could use the passthrough webhook from #2 and then in your own lambda code utilize the payload validation script?

Another approach might be to drop the SNS middleman and have the validation function make a lambda.invoke() request. The downside there is that there's no baked-in-retry on direct lambda invocations.

from deprecated-hookshot.

rclark avatar rclark commented on June 17, 2024

This is solved by the new .passthrough() function.

from deprecated-hookshot.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.