File tree Expand file tree Collapse file tree 6 files changed +30
-13
lines changed Expand file tree Collapse file tree 6 files changed +30
-13
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ trim_trailing_whitespace = true
10
10
indent_style = space
11
11
indent_size = 2
12
12
13
+ [* .md ]
14
+ trim_trailing_whitespace = false # needed for <br/>-like breaks
15
+
13
16
[* .hs, * .lhs ]
14
17
charset = utf-8
15
18
indent_size = 4
Original file line number Diff line number Diff line change 1
- ![ github-webhooks Mascot] ( ./doc/github-webhooks-mascot-248.svg ) < br />
1
+ ![ github-webhooks Mascot] ( ./doc/github-webhooks-mascot-248.svg )
2
2
github-webhooks
3
3
---------------
4
4
@@ -47,11 +47,11 @@ eitherDecode' json :: Either String WatchEvent
47
47
```
48
48
49
49
Some practical integration examples are also provided:
50
- * [ Servant Integration (Simple)] ( ./examples/servant-simple#readme ) < br />
50
+ * [ Servant Integration (Simple)] ( ./examples/servant-simple#readme )
51
51
Minimal working example of integrating this package with [ servant] and [ servant-github-webhook] .
52
- * [ Servant Integration (Typical)] ( ./examples/servant-adv#readme ) < br />
52
+ * [ Servant Integration (Typical)] ( ./examples/servant-adv#readme )
53
53
This example demonstrates more advanced use-cases with [ servant] by decoding multiple different types of payloads on the same endpoint.
54
- * [ Scotty Integration] ( ./examples/scotty#readme ) < br />
54
+ * [ Scotty Integration] ( ./examples/scotty#readme )
55
55
Minimal working example of integrating this package with [ scotty] .
56
56
57
57
## Changelog
Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ type IssueCommentHookAPI
21
21
:> Post '[JSON ] ()
22
22
23
23
issueCommentHook :: RepoWebhookEvent -> (() , IssueCommentEvent ) -> Handler ()
24
- issueCommentHook _ ev =
25
- liftIO . putStrLn $ (show . whIssueCommentBody . evIssueCommentPayload . snd ) ev
24
+ issueCommentHook _ ev = liftIO $
25
+ print $ (show . whIssueCommentBody . evIssueCommentPayload . snd ) ev
26
26
27
27
main :: IO ()
28
28
main = do
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ type PushHookAPI
26
26
pushHook :: RepoWebhookEvent -> (() , PushEvent ) -> Handler ()
27
27
pushHook _ (_, ev) = liftIO $ do
28
28
putStrLn $ (show . whUserLogin . evPushSender) ev ++ " pushed a commit causing HEAD SHA to become:"
29
- putStrLn $ (show . fromJust . evPushHeadSha) ev
29
+ print $ (fromJust . evPushHeadSha) ev
30
30
31
31
-- Issue Comment Hook
32
32
@@ -38,7 +38,7 @@ type IssueCommentHookAPI
38
38
issueCommentHook :: RepoWebhookEvent -> (() , IssueCommentEvent ) -> Handler ()
39
39
issueCommentHook _ (_, ev) = liftIO $ do
40
40
putStrLn " An issue comment was posted:"
41
- putStrLn $ (show . whIssueCommentBody . evIssueCommentPayload) ev
41
+ print $ (whIssueCommentBody . evIssueCommentPayload) ev
42
42
43
43
-- Combine Handlers
44
44
Original file line number Diff line number Diff line change 2
2
--
3
3
-- see: https://github.com/sol/hpack
4
4
--
5
- -- hash: 83b636769db28062ff2e3fe32da99c50cdecac5126424a868592c3d32145f869
5
+ -- hash: 5615459135d4ff74ceec05176fb1708f3f5c7b50dd4184b4d462e62af6bbdb17
6
6
7
7
name : github-webhooks
8
8
version : 0.9.0
9
- synopsis : Support for GitHub webhook payloads.
10
- description : Complete instances for decoding (using @aeson@) and interpreting webhook payloads from the GitHub API.
9
+ synopsis : Aeson instances for GitHub Webhook payloads.
10
+ description : Complete instances for decoding GitHub Webhook payloads (using @aeson@). See the README at <https://github.com/onrock-eng/github-webhooks#readme> for examples.
11
+ category : GitHub
11
12
homepage : https://github.com/onrock-eng/github-webhooks#readme
12
13
bug-reports : https://github.com/onrock-eng/github-webhooks/issues
13
14
author : Kyle Van Berendonck <kyle.vanberendonck@onrock.engineering>
@@ -18,6 +19,11 @@ license-file: LICENSE
18
19
build-type : Simple
19
20
cabal-version : >= 1.10
20
21
22
+ extra-source-files :
23
+ CHANGELOG.md
24
+ package.yaml
25
+ stack.yaml
26
+
21
27
source-repository head
22
28
type : git
23
29
location : https://github.com/onrock-eng/github-webhooks
Original file line number Diff line number Diff line change 1
1
name : github-webhooks
2
2
version : 0.9.0
3
+
4
+ category : GitHub
3
5
license : MIT
4
- synopsis : Support for GitHub webhook payloads.
5
- description : Complete instances for decoding (using @aeson@) and interpreting webhook payloads from the GitHub API.
6
+ extra-source-files :
7
+ - package.yaml
8
+ - stack.yaml
9
+ - CHANGELOG.md
10
+ synopsis : Aeson instances for GitHub Webhook payloads.
6
11
copyright : (c) 2017-2018 OnRock Engineering
7
12
author : Kyle Van Berendonck <kyle.vanberendonck@onrock.engineering>
8
13
maintainer : Kyle Van Berendonck <foss@onrock.engineering>
9
14
github : onrock-eng/github-webhooks
15
+ description :
16
+ Complete instances for decoding GitHub Webhook payloads (using @aeson@).
17
+ See the README at <https://github.com/onrock-eng/github-webhooks#readme> for examples.
10
18
11
19
ghc-options :
12
20
- -Wall
You can’t perform that action at this time.
0 commit comments