Skip to content

cuedo/github-webhooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

github-webhooks Mascot
github-webhooks

Hackage Stackage License

release master
Linux & OSX travis-linux travis-linux
Windows appveyor-windows appveyor-windows

Complete Haskell types and instances for decoding GitHub API Webhook payloads.

Features

  • Best-in-class JSON decoding via aeson.
  • Unicode string support via text.
  • Suitable for large data payloads using vector.
  • Type-safe encoding of optional data.
  • Type-safe event action encodings with support for future API changes.
  • Instances for Typeable, Data, Generic and NFData.
  • Strongly typed utility classes EventHasSender, EventHasRepo et al.
  • Strict data types suitable for high performance streaming operations.
  • Full support for these event types.

Installation

github-webhooks is available via installation on Hackage and Stackage.

Examples

Minimal working example:

$ stack ghci bytestring aeson github-webhooks
import qualified Data.ByteString.Lazy as BSL
import           Data.Aeson           ( eitherDecode' )

json <- BSL.readFile "fixtures/watch-event.json"
eitherDecode' json :: Either String WatchEvent

Some practical integration examples are also provided:

Changelog

See CHANGELOG.md for a summary of changes in each release.

Roadmap

See ROADMAP.md for the project timeline and feature estimation of future releases.

Authors

See AUTHORS for a list of significant authors.

License

See LICENSE for a bundled copy of the MIT license.


Free open source software, sponsored by

ONROCK