Skip to content

Commit

Permalink
Add pull request event
Browse files Browse the repository at this point in the history
Signed-off-by: Sascha Grunert <mail@saschagrunert.de>
  • Loading branch information
saschagrunert committed Jun 22, 2019
1 parent 64bc929 commit 69b356e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.lock
*.orig
*.sqlite3*
*.tar
Expand Down
10 changes: 9 additions & 1 deletion src/Handler/GitHub.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@
-- @since 0.1.0
module Handler.GitHub ( postGitHubR ) where

import Data.Aeson.Types as T ( Result(Success) )

import GitHub.Data.Webhooks.Events ( PullRequestEvent )

import Import

postGitHubR :: Handler ()
postGitHubR = sendResponseStatus status200 ()
postGitHubR = do
body <- parseCheckJsonBody :: Handler (T.Result PullRequestEvent)
case body of
Success _ -> sendResponseStatus status200 ()
_ -> sendResponseStatus status400 ()

0 comments on commit 69b356e

Please sign in to comment.