Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/GitHub/Data/Webhooks/Payload.hs
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,11 @@ import GHC.Generics (Generic)

-- Types lifted from the @github@ package.

-- | Represents the owner of the repository.
data OwnerType = OwnerUser | OwnerOrganization
-- | Represents the owner of a repository, pull request or similar.
--
-- A bot is a "special type of user which takes actions on behalf of GitHub Apps".
-- See also https://developer.github.com/v4/object/bot/
data OwnerType = OwnerUser | OwnerOrganization | OwnerBot
deriving (Eq, Ord, Enum, Bounded, Show, Read, Generic, Typeable, Data)

instance NFData OwnerType
Expand All @@ -70,6 +73,7 @@ instance FromJSON OwnerType where
case T.toLower t of
"user" -> pure OwnerUser
"organization" -> pure OwnerOrganization
"bot" -> pure OwnerBot
_ -> fail $ "Unknown owner type: " ++ T.unpack t


Expand Down