Expose event message headers, introduce a new way to read the body from an io.Reader#1955
Conversation
EventTypeHeader as well as DeliveryIDHeader
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
|
@googlebot I signed it! |
io.Readerio.Reader
Codecov Report
@@ Coverage Diff @@
## master #1955 +/- ##
==========================================
+ Coverage 97.84% 97.87% +0.02%
==========================================
Files 105 105
Lines 6809 6809
==========================================
+ Hits 6662 6664 +2
+ Misses 80 79 -1
+ Partials 67 66 -1
Continue to review full report at Codecov.
|
|
@m19c - do you want to resolve the merge conflicts, or would you like me to do that? |
|
Thank you, @m19c ! Could you please run |
|
Done. Intent should be fixed now. |
|
@m19c - bonus points if you can increase the code coverage by writing a test for your new method (while we are waiting for a second LGTM). 😄 |
|
Done 👍🏽 |
|
I've also added another test to capture invalid |
This pull request introduces the changes described in #1944.
sha1SignatureHeader,sha256SignatureHeader,eventTypeHeaderanddeliveryIDHeaderValidatePayloadFromBodyto read the body directly from anio.Readerrather than ahttp.Request.The changes described enables the possibility to use
go-githubeven with http libraries likefiberorfasthttp.Example A:
Example B: