packages feed

github-webhook-handler 0.0.3 → 0.0.4

raw patch · 2 files changed

+5/−5 lines, 2 filesdep ~github-typesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: github-types

API changes (from Hackage documentation)

- GitHub.WebHook.Handler: Handler :: Maybe String -> m ByteString -> (ByteString -> m (Maybe ByteString)) -> (Either Error (UUID, Event) -> m ()) -> Handler m
+ GitHub.WebHook.Handler: Handler :: Maybe String -> m ByteString -> (ByteString -> m (Maybe ByteString)) -> (Either Error (UUID, Payload) -> m ()) -> Handler m
- GitHub.WebHook.Handler: hAction :: Handler m -> Either Error (UUID, Event) -> m ()
+ GitHub.WebHook.Handler: hAction :: Handler m -> Either Error (UUID, Payload) -> m ()

Files

github-webhook-handler.cabal view
@@ -1,5 +1,5 @@ name:                github-webhook-handler-version:             0.0.3+version:             0.0.4  synopsis:            GitHub WebHook Handler description:@@ -31,7 +31,7 @@   build-depends:      base >=4 && <4.9    , bytestring-   , github-types+   , github-types >=0.2 && <1    , transformers    , aeson    , text
src/GitHub/WebHook/Handler.hs view
@@ -38,7 +38,7 @@       -- ^ Action which is used to retrieve a particular header from the       -- request. -    , hAction :: Either Error (UUID, Event) -> m ()+    , hAction :: Either Error (UUID, Payload) -> m ()       -- ^ Action which is executed once we've processed all the information       -- in the request. GitHub includes a unique UUID in each request.     }@@ -65,7 +65,7 @@       -- a configuration error on either end.  -toParseError :: String -> Either Error Event+toParseError :: String -> Either Error Payload toParseError = Left . ParseError . T.pack  @@ -105,7 +105,7 @@             case eitherDecodeStrict' body of                 Left e -> toParseError e                 Right value -> either toParseError Right $-                    parseEither (eventParser $ decodeUtf8 eventName) value+                    parseEither (webhookPayloadParser $ decodeUtf8 eventName) value      hAction h $ case mbDelivery of         Nothing -> Left InvalidRequest