Skip to content

Commit dbbb3dd

Browse files
committed
Correct lint error in build and remove <br> in docs
1 parent ee1968a commit dbbb3dd

File tree

6 files changed

+30
-13
lines changed

6 files changed

+30
-13
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ trim_trailing_whitespace = true
1010
indent_style = space
1111
indent_size = 2
1212

13+
[*.md]
14+
trim_trailing_whitespace = false # needed for <br/>-like breaks
15+
1316
[*.hs, *.lhs]
1417
charset = utf-8
1518
indent_size = 4

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![github-webhooks Mascot](./doc/github-webhooks-mascot-248.svg)<br/>
1+
![github-webhooks Mascot](./doc/github-webhooks-mascot-248.svg)
22
github-webhooks
33
---------------
44

@@ -47,11 +47,11 @@ eitherDecode' json :: Either String WatchEvent
4747
```
4848

4949
Some practical integration examples are also provided:
50-
* [Servant Integration (Simple)](./examples/servant-simple#readme)<br/>
50+
* [Servant Integration (Simple)](./examples/servant-simple#readme)
5151
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)
5353
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)
5555
Minimal working example of integrating this package with [scotty].
5656

5757
## Changelog

examples/servant-simple/src/Main.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ type IssueCommentHookAPI
2121
:> Post '[JSON] ()
2222

2323
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
2626

2727
main :: IO ()
2828
main = do

examples/servant/src/Main.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ type PushHookAPI
2626
pushHook :: RepoWebhookEvent -> ((), PushEvent) -> Handler ()
2727
pushHook _ (_, ev) = liftIO $ do
2828
putStrLn $ (show . whUserLogin . evPushSender) ev ++ " pushed a commit causing HEAD SHA to become:"
29-
putStrLn $ (show . fromJust . evPushHeadSha) ev
29+
print $ (fromJust . evPushHeadSha) ev
3030

3131
-- Issue Comment Hook
3232

@@ -38,7 +38,7 @@ type IssueCommentHookAPI
3838
issueCommentHook :: RepoWebhookEvent -> ((), IssueCommentEvent) -> Handler ()
3939
issueCommentHook _ (_, ev) = liftIO $ do
4040
putStrLn "An issue comment was posted:"
41-
putStrLn $ (show . whIssueCommentBody . evIssueCommentPayload) ev
41+
print $ (whIssueCommentBody . evIssueCommentPayload) ev
4242

4343
-- Combine Handlers
4444

github-webhooks.cabal

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
--
33
-- see: https://github.com/sol/hpack
44
--
5-
-- hash: 83b636769db28062ff2e3fe32da99c50cdecac5126424a868592c3d32145f869
5+
-- hash: 5615459135d4ff74ceec05176fb1708f3f5c7b50dd4184b4d462e62af6bbdb17
66

77
name: github-webhooks
88
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
1112
homepage: https://github.com/onrock-eng/github-webhooks#readme
1213
bug-reports: https://github.com/onrock-eng/github-webhooks/issues
1314
author: Kyle Van Berendonck <kyle.vanberendonck@onrock.engineering>
@@ -18,6 +19,11 @@ license-file: LICENSE
1819
build-type: Simple
1920
cabal-version: >= 1.10
2021

22+
extra-source-files:
23+
CHANGELOG.md
24+
package.yaml
25+
stack.yaml
26+
2127
source-repository head
2228
type: git
2329
location: https://github.com/onrock-eng/github-webhooks

package.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
name: github-webhooks
22
version: 0.9.0
3+
4+
category: GitHub
35
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.
611
copyright: (c) 2017-2018 OnRock Engineering
712
author: Kyle Van Berendonck <kyle.vanberendonck@onrock.engineering>
813
maintainer: Kyle Van Berendonck <foss@onrock.engineering>
914
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.
1018

1119
ghc-options:
1220
- -Wall

0 commit comments

Comments
 (0)