Skip to content

Commit

Permalink
Fixed build
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulmutt committed Jan 28, 2018
1 parent 0d29c05 commit f376af2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
5 changes: 3 additions & 2 deletions servant-github-webhook.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ library
http-types >=0.9,
unordered-containers >= 0.2,
memory >=0.14,
servant >=0.11,
servant-server >=0.11,
servant >=0.11 && < 0.12,
servant-server >=0.11 && < 0.12,
string-conversions >=0.4,
text >=1.2,
transformers,
wai >=3.2

test-suite multikey
Expand Down
8 changes: 4 additions & 4 deletions src/Servant/GitHub/Webhook.hs
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ retrieve.
{-# LANGUAGE PartialTypeSignatures #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}

module Servant.GitHub.Webhook
( -- * Servant combinators
Expand Down Expand Up @@ -251,7 +251,7 @@ instance Aeson.FromJSON e => Aeson.FromJSON (EventWithHookRepo e) where
instance EventHasRepo e => HasRepository (EventWithHookRepo e) where
getFullName = Just . whRepoFullName . repoForEvent . eventOf

instance forall sublayout context list result (key :: k).
instance
( HasServer sublayout context
, HasContextEntry context (GitHubKey' (Demote key) result)
, Reflect key
Expand Down Expand Up @@ -315,7 +315,7 @@ instance forall sublayout context list result (key :: k).
-> DelayedIO (Demote key, result)
verifySigWithKey (msg, hdr, v) key = do
let sig =
B16.encode $ convert $ hmacGetDigest $ hmac @_ @_ @SHA1 key msg
B16.encode $ convert $ hmacGetDigest (hmac key msg :: HMAC SHA1)

case parseHeaderMaybe =<< hdr of
Nothing -> delayedFailFatal err401
Expand All @@ -325,7 +325,7 @@ instance forall sublayout context list result (key :: k).
then pure (keyIndex, v)
else delayedFailFatal err401

instance forall sublayout context events.
instance
(Reflect events, HasServer sublayout context)
=> HasServer (GitHubEvent events :> sublayout) context where

Expand Down
17 changes: 14 additions & 3 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
resolver: lts-10.0
resolver: lts-6.27
extra-deps:
- git: https://github.com/onrock-eng/github-webhooks
commit: 9d5bf07029ed99fca5e53123c7a9c8a8af9819bc
- git: https://github.com/rahulmutt/github-webhooks
commit: cf16054e2ae9eba8c3bca3e2bbe5e1fb5bffd817
- cryptonite-0.24
- github-0.18
- memory-0.14.14
- servant-0.11
- servant-server-0.11.0.1
- basement-0.0.6
- cabal-doctest-1.0.4
- foundation-0.0.19
- http-api-data-0.3.7.1
- natural-transformation-0.4
- attoparsec-iso8601-1.0.0.0

0 comments on commit f376af2

Please sign in to comment.