github-webhooks 0.11.0 → 0.12.0
raw patch · 15 files changed
+1421/−41 lines, 15 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ GitHub.Data.Webhooks.Events: CheckRunEvent :: !CheckRunEventAction -> !HookCheckRun -> !Maybe HookCheckRunRequestedAction -> !HookRepository -> !Maybe HookOrganization -> !HookUser -> !Maybe HookChecksInstallation -> CheckRunEvent
+ GitHub.Data.Webhooks.Events: CheckRunEventActionCompleted :: CheckRunEventAction
+ GitHub.Data.Webhooks.Events: CheckRunEventActionCreated :: CheckRunEventAction
+ GitHub.Data.Webhooks.Events: CheckRunEventActionOther :: !Text -> CheckRunEventAction
+ GitHub.Data.Webhooks.Events: CheckRunEventActionRequestedAction :: CheckRunEventAction
+ GitHub.Data.Webhooks.Events: CheckRunEventActionRerequested :: CheckRunEventAction
+ GitHub.Data.Webhooks.Events: CheckSuiteEvent :: !CheckSuiteEventAction -> !HookCheckSuite -> !HookRepository -> !Maybe HookOrganization -> !HookUser -> !Maybe HookChecksInstallation -> CheckSuiteEvent
+ GitHub.Data.Webhooks.Events: CheckSuiteEventActionCompleted :: CheckSuiteEventAction
+ GitHub.Data.Webhooks.Events: CheckSuiteEventActionOther :: !Text -> CheckSuiteEventAction
+ GitHub.Data.Webhooks.Events: CheckSuiteEventActionRequested :: CheckSuiteEventAction
+ GitHub.Data.Webhooks.Events: CheckSuiteEventActionRerequested :: CheckSuiteEventAction
+ GitHub.Data.Webhooks.Events: [evCheckRunAction] :: CheckRunEvent -> !CheckRunEventAction
+ GitHub.Data.Webhooks.Events: [evCheckRunCheckRun] :: CheckRunEvent -> !HookCheckRun
+ GitHub.Data.Webhooks.Events: [evCheckRunInstallation] :: CheckRunEvent -> !Maybe HookChecksInstallation
+ GitHub.Data.Webhooks.Events: [evCheckRunOrganization] :: CheckRunEvent -> !Maybe HookOrganization
+ GitHub.Data.Webhooks.Events: [evCheckRunRepository] :: CheckRunEvent -> !HookRepository
+ GitHub.Data.Webhooks.Events: [evCheckRunRequestedAction] :: CheckRunEvent -> !Maybe HookCheckRunRequestedAction
+ GitHub.Data.Webhooks.Events: [evCheckRunSender] :: CheckRunEvent -> !HookUser
+ GitHub.Data.Webhooks.Events: [evCheckSuiteAction] :: CheckSuiteEvent -> !CheckSuiteEventAction
+ GitHub.Data.Webhooks.Events: [evCheckSuiteCheckSuite] :: CheckSuiteEvent -> !HookCheckSuite
+ GitHub.Data.Webhooks.Events: [evCheckSuiteInstallation] :: CheckSuiteEvent -> !Maybe HookChecksInstallation
+ GitHub.Data.Webhooks.Events: [evCheckSuiteOrganization] :: CheckSuiteEvent -> !Maybe HookOrganization
+ GitHub.Data.Webhooks.Events: [evCheckSuiteRepository] :: CheckSuiteEvent -> !HookRepository
+ GitHub.Data.Webhooks.Events: [evCheckSuiteSender] :: CheckSuiteEvent -> !HookUser
+ GitHub.Data.Webhooks.Events: data CheckRunEvent
+ GitHub.Data.Webhooks.Events: data CheckRunEventAction
+ GitHub.Data.Webhooks.Events: data CheckSuiteEvent
+ GitHub.Data.Webhooks.Events: data CheckSuiteEventAction
+ GitHub.Data.Webhooks.Events: instance Control.DeepSeq.NFData GitHub.Data.Webhooks.Events.CheckRunEvent
+ GitHub.Data.Webhooks.Events: instance Control.DeepSeq.NFData GitHub.Data.Webhooks.Events.CheckRunEventAction
+ GitHub.Data.Webhooks.Events: instance Control.DeepSeq.NFData GitHub.Data.Webhooks.Events.CheckSuiteEvent
+ GitHub.Data.Webhooks.Events: instance Control.DeepSeq.NFData GitHub.Data.Webhooks.Events.CheckSuiteEventAction
+ GitHub.Data.Webhooks.Events: instance Data.Aeson.Types.FromJSON.FromJSON GitHub.Data.Webhooks.Events.CheckRunEvent
+ GitHub.Data.Webhooks.Events: instance Data.Aeson.Types.FromJSON.FromJSON GitHub.Data.Webhooks.Events.CheckRunEventAction
+ GitHub.Data.Webhooks.Events: instance Data.Aeson.Types.FromJSON.FromJSON GitHub.Data.Webhooks.Events.CheckSuiteEvent
+ GitHub.Data.Webhooks.Events: instance Data.Aeson.Types.FromJSON.FromJSON GitHub.Data.Webhooks.Events.CheckSuiteEventAction
+ GitHub.Data.Webhooks.Events: instance Data.Data.Data GitHub.Data.Webhooks.Events.CheckRunEvent
+ GitHub.Data.Webhooks.Events: instance Data.Data.Data GitHub.Data.Webhooks.Events.CheckRunEventAction
+ GitHub.Data.Webhooks.Events: instance Data.Data.Data GitHub.Data.Webhooks.Events.CheckSuiteEvent
+ GitHub.Data.Webhooks.Events: instance Data.Data.Data GitHub.Data.Webhooks.Events.CheckSuiteEventAction
+ GitHub.Data.Webhooks.Events: instance GHC.Classes.Eq GitHub.Data.Webhooks.Events.CheckRunEvent
+ GitHub.Data.Webhooks.Events: instance GHC.Classes.Eq GitHub.Data.Webhooks.Events.CheckRunEventAction
+ GitHub.Data.Webhooks.Events: instance GHC.Classes.Eq GitHub.Data.Webhooks.Events.CheckSuiteEvent
+ GitHub.Data.Webhooks.Events: instance GHC.Classes.Eq GitHub.Data.Webhooks.Events.CheckSuiteEventAction
+ GitHub.Data.Webhooks.Events: instance GHC.Classes.Ord GitHub.Data.Webhooks.Events.CheckRunEventAction
+ GitHub.Data.Webhooks.Events: instance GHC.Classes.Ord GitHub.Data.Webhooks.Events.CheckSuiteEventAction
+ GitHub.Data.Webhooks.Events: instance GHC.Generics.Generic GitHub.Data.Webhooks.Events.CheckRunEvent
+ GitHub.Data.Webhooks.Events: instance GHC.Generics.Generic GitHub.Data.Webhooks.Events.CheckRunEventAction
+ GitHub.Data.Webhooks.Events: instance GHC.Generics.Generic GitHub.Data.Webhooks.Events.CheckSuiteEvent
+ GitHub.Data.Webhooks.Events: instance GHC.Generics.Generic GitHub.Data.Webhooks.Events.CheckSuiteEventAction
+ GitHub.Data.Webhooks.Events: instance GHC.Show.Show GitHub.Data.Webhooks.Events.CheckRunEvent
+ GitHub.Data.Webhooks.Events: instance GHC.Show.Show GitHub.Data.Webhooks.Events.CheckRunEventAction
+ GitHub.Data.Webhooks.Events: instance GHC.Show.Show GitHub.Data.Webhooks.Events.CheckSuiteEvent
+ GitHub.Data.Webhooks.Events: instance GHC.Show.Show GitHub.Data.Webhooks.Events.CheckSuiteEventAction
+ GitHub.Data.Webhooks.Events: instance GitHub.Data.Webhooks.Events.EventHasRepo GitHub.Data.Webhooks.Events.CheckRunEvent
+ GitHub.Data.Webhooks.Events: instance GitHub.Data.Webhooks.Events.EventHasRepo GitHub.Data.Webhooks.Events.CheckSuiteEvent
+ GitHub.Data.Webhooks.Events: instance GitHub.Data.Webhooks.Events.EventHasSender GitHub.Data.Webhooks.Events.CheckRunEvent
+ GitHub.Data.Webhooks.Events: instance GitHub.Data.Webhooks.Events.EventHasSender GitHub.Data.Webhooks.Events.CheckSuiteEvent
+ GitHub.Data.Webhooks.Payload: HookCheckRun :: !Int -> !Text -> !Text -> !URL -> !URL -> !URL -> !HookCheckRunStatus -> !Maybe HookCheckRunConclusion -> !UTCTime -> !Maybe UTCTime -> !HookCheckRunOutput -> !Text -> !HookCheckSuite -> !Vector HookChecksPullRequest -> HookCheckRun
+ GitHub.Data.Webhooks.Payload: HookCheckRunConclusionActionRequired :: HookCheckRunConclusion
+ GitHub.Data.Webhooks.Payload: HookCheckRunConclusionCancelled :: HookCheckRunConclusion
+ GitHub.Data.Webhooks.Payload: HookCheckRunConclusionFailure :: HookCheckRunConclusion
+ GitHub.Data.Webhooks.Payload: HookCheckRunConclusionNeutral :: HookCheckRunConclusion
+ GitHub.Data.Webhooks.Payload: HookCheckRunConclusionOther :: !Text -> HookCheckRunConclusion
+ GitHub.Data.Webhooks.Payload: HookCheckRunConclusionStale :: HookCheckRunConclusion
+ GitHub.Data.Webhooks.Payload: HookCheckRunConclusionSuccess :: HookCheckRunConclusion
+ GitHub.Data.Webhooks.Payload: HookCheckRunConclusionTimedOut :: HookCheckRunConclusion
+ GitHub.Data.Webhooks.Payload: HookCheckRunOutput :: !Maybe Text -> !Maybe Text -> !Maybe Text -> !Int -> !URL -> HookCheckRunOutput
+ GitHub.Data.Webhooks.Payload: HookCheckRunRequestedAction :: Text -> HookCheckRunRequestedAction
+ GitHub.Data.Webhooks.Payload: HookCheckRunStatusCompleted :: HookCheckRunStatus
+ GitHub.Data.Webhooks.Payload: HookCheckRunStatusInProgress :: HookCheckRunStatus
+ GitHub.Data.Webhooks.Payload: HookCheckRunStatusOther :: !Text -> HookCheckRunStatus
+ GitHub.Data.Webhooks.Payload: HookCheckRunStatusQueued :: HookCheckRunStatus
+ GitHub.Data.Webhooks.Payload: HookCheckSuite :: !Int -> !Maybe Text -> !Text -> !HookCheckSuiteStatus -> !Maybe HookCheckSuiteConclusion -> !URL -> !Maybe Text -> !Text -> !Vector HookChecksPullRequest -> !UTCTime -> !UTCTime -> !Maybe Int -> !Maybe URL -> !Maybe HookCheckSuiteCommit -> HookCheckSuite
+ GitHub.Data.Webhooks.Payload: HookCheckSuiteCommit :: !Text -> !HookSimpleUser -> !HookSimpleUser -> HookCheckSuiteCommit
+ GitHub.Data.Webhooks.Payload: HookCheckSuiteConclusionActionRequired :: HookCheckSuiteConclusion
+ GitHub.Data.Webhooks.Payload: HookCheckSuiteConclusionCancelled :: HookCheckSuiteConclusion
+ GitHub.Data.Webhooks.Payload: HookCheckSuiteConclusionFailure :: HookCheckSuiteConclusion
+ GitHub.Data.Webhooks.Payload: HookCheckSuiteConclusionNeutral :: HookCheckSuiteConclusion
+ GitHub.Data.Webhooks.Payload: HookCheckSuiteConclusionOther :: !Text -> HookCheckSuiteConclusion
+ GitHub.Data.Webhooks.Payload: HookCheckSuiteConclusionStale :: HookCheckSuiteConclusion
+ GitHub.Data.Webhooks.Payload: HookCheckSuiteConclusionSuccess :: HookCheckSuiteConclusion
+ GitHub.Data.Webhooks.Payload: HookCheckSuiteConclusionTimedOut :: HookCheckSuiteConclusion
+ GitHub.Data.Webhooks.Payload: HookCheckSuiteStatusCompleted :: HookCheckSuiteStatus
+ GitHub.Data.Webhooks.Payload: HookCheckSuiteStatusInProgress :: HookCheckSuiteStatus
+ GitHub.Data.Webhooks.Payload: HookCheckSuiteStatusOther :: !Text -> HookCheckSuiteStatus
+ GitHub.Data.Webhooks.Payload: HookCheckSuiteStatusQueued :: HookCheckSuiteStatus
+ GitHub.Data.Webhooks.Payload: HookCheckSuiteStatusRequested :: HookCheckSuiteStatus
+ GitHub.Data.Webhooks.Payload: HookChecksInstallation :: Int -> HookChecksInstallation
+ GitHub.Data.Webhooks.Payload: HookChecksPullRequest :: !URL -> !Int -> !Int -> !HookChecksPullRequestTarget -> !HookChecksPullRequestTarget -> HookChecksPullRequest
+ GitHub.Data.Webhooks.Payload: HookChecksPullRequestRepository :: !Int -> !URL -> !Text -> HookChecksPullRequestRepository
+ GitHub.Data.Webhooks.Payload: HookChecksPullRequestTarget :: !Text -> !Text -> !HookChecksPullRequestRepository -> HookChecksPullRequestTarget
+ GitHub.Data.Webhooks.Payload: [weCheckRunCheckSuite] :: HookCheckRun -> !HookCheckSuite
+ GitHub.Data.Webhooks.Payload: [whCheckRunCompletedAt] :: HookCheckRun -> !Maybe UTCTime
+ GitHub.Data.Webhooks.Payload: [whCheckRunConclusion] :: HookCheckRun -> !Maybe HookCheckRunConclusion
+ GitHub.Data.Webhooks.Payload: [whCheckRunDetailsUrl] :: HookCheckRun -> !URL
+ GitHub.Data.Webhooks.Payload: [whCheckRunExternalId] :: HookCheckRun -> !Text
+ GitHub.Data.Webhooks.Payload: [whCheckRunHeadSha] :: HookCheckRun -> !Text
+ GitHub.Data.Webhooks.Payload: [whCheckRunHtmlUrl] :: HookCheckRun -> !URL
+ GitHub.Data.Webhooks.Payload: [whCheckRunId] :: HookCheckRun -> !Int
+ GitHub.Data.Webhooks.Payload: [whCheckRunName] :: HookCheckRun -> !Text
+ GitHub.Data.Webhooks.Payload: [whCheckRunOutputAnnotationsCount] :: HookCheckRunOutput -> !Int
+ GitHub.Data.Webhooks.Payload: [whCheckRunOutputAnnotationsUrl] :: HookCheckRunOutput -> !URL
+ GitHub.Data.Webhooks.Payload: [whCheckRunOutputSummary] :: HookCheckRunOutput -> !Maybe Text
+ GitHub.Data.Webhooks.Payload: [whCheckRunOutputText] :: HookCheckRunOutput -> !Maybe Text
+ GitHub.Data.Webhooks.Payload: [whCheckRunOutputTitle] :: HookCheckRunOutput -> !Maybe Text
+ GitHub.Data.Webhooks.Payload: [whCheckRunOutput] :: HookCheckRun -> !HookCheckRunOutput
+ GitHub.Data.Webhooks.Payload: [whCheckRunPullRequests] :: HookCheckRun -> !Vector HookChecksPullRequest
+ GitHub.Data.Webhooks.Payload: [whCheckRunRequestedActionIdentifier] :: HookCheckRunRequestedAction -> Text
+ GitHub.Data.Webhooks.Payload: [whCheckRunStartedAt] :: HookCheckRun -> !UTCTime
+ GitHub.Data.Webhooks.Payload: [whCheckRunStatus] :: HookCheckRun -> !HookCheckRunStatus
+ GitHub.Data.Webhooks.Payload: [whCheckRunUrl] :: HookCheckRun -> !URL
+ GitHub.Data.Webhooks.Payload: [whCheckSuiteAfterSha] :: HookCheckSuite -> !Text
+ GitHub.Data.Webhooks.Payload: [whCheckSuiteBeforeSha] :: HookCheckSuite -> !Maybe Text
+ GitHub.Data.Webhooks.Payload: [whCheckSuiteCheckRunsUrl] :: HookCheckSuite -> !Maybe URL
+ GitHub.Data.Webhooks.Payload: [whCheckSuiteCommitAuthor] :: HookCheckSuiteCommit -> !HookSimpleUser
+ GitHub.Data.Webhooks.Payload: [whCheckSuiteCommitCommitter] :: HookCheckSuiteCommit -> !HookSimpleUser
+ GitHub.Data.Webhooks.Payload: [whCheckSuiteCommitSha] :: HookCheckSuiteCommit -> !Text
+ GitHub.Data.Webhooks.Payload: [whCheckSuiteConclusion] :: HookCheckSuite -> !Maybe HookCheckSuiteConclusion
+ GitHub.Data.Webhooks.Payload: [whCheckSuiteCreatedAt] :: HookCheckSuite -> !UTCTime
+ GitHub.Data.Webhooks.Payload: [whCheckSuiteHeadBranch] :: HookCheckSuite -> !Maybe Text
+ GitHub.Data.Webhooks.Payload: [whCheckSuiteHeadCommit] :: HookCheckSuite -> !Maybe HookCheckSuiteCommit
+ GitHub.Data.Webhooks.Payload: [whCheckSuiteHeadSha] :: HookCheckSuite -> !Text
+ GitHub.Data.Webhooks.Payload: [whCheckSuiteId] :: HookCheckSuite -> !Int
+ GitHub.Data.Webhooks.Payload: [whCheckSuiteLatestCheckRunsCount] :: HookCheckSuite -> !Maybe Int
+ GitHub.Data.Webhooks.Payload: [whCheckSuitePullRequests] :: HookCheckSuite -> !Vector HookChecksPullRequest
+ GitHub.Data.Webhooks.Payload: [whCheckSuiteStatus] :: HookCheckSuite -> !HookCheckSuiteStatus
+ GitHub.Data.Webhooks.Payload: [whCheckSuiteUpdatedAt] :: HookCheckSuite -> !UTCTime
+ GitHub.Data.Webhooks.Payload: [whCheckSuiteUrl] :: HookCheckSuite -> !URL
+ GitHub.Data.Webhooks.Payload: [whChecksInstallationId] :: HookChecksInstallation -> Int
+ GitHub.Data.Webhooks.Payload: [whChecksPullRequestBase] :: HookChecksPullRequest -> !HookChecksPullRequestTarget
+ GitHub.Data.Webhooks.Payload: [whChecksPullRequestHead] :: HookChecksPullRequest -> !HookChecksPullRequestTarget
+ GitHub.Data.Webhooks.Payload: [whChecksPullRequestId] :: HookChecksPullRequest -> !Int
+ GitHub.Data.Webhooks.Payload: [whChecksPullRequestNumber] :: HookChecksPullRequest -> !Int
+ GitHub.Data.Webhooks.Payload: [whChecksPullRequestRepositoryId] :: HookChecksPullRequestRepository -> !Int
+ GitHub.Data.Webhooks.Payload: [whChecksPullRequestRepositoryName] :: HookChecksPullRequestRepository -> !Text
+ GitHub.Data.Webhooks.Payload: [whChecksPullRequestRepositoryUrl] :: HookChecksPullRequestRepository -> !URL
+ GitHub.Data.Webhooks.Payload: [whChecksPullRequestTargetRef] :: HookChecksPullRequestTarget -> !Text
+ GitHub.Data.Webhooks.Payload: [whChecksPullRequestTargetRepo] :: HookChecksPullRequestTarget -> !HookChecksPullRequestRepository
+ GitHub.Data.Webhooks.Payload: [whChecksPullRequestTargetSha] :: HookChecksPullRequestTarget -> !Text
+ GitHub.Data.Webhooks.Payload: [whChecksPullRequestUrl] :: HookChecksPullRequest -> !URL
+ GitHub.Data.Webhooks.Payload: data HookCheckRun
+ GitHub.Data.Webhooks.Payload: data HookCheckRunConclusion
+ GitHub.Data.Webhooks.Payload: data HookCheckRunOutput
+ GitHub.Data.Webhooks.Payload: data HookCheckRunStatus
+ GitHub.Data.Webhooks.Payload: data HookCheckSuite
+ GitHub.Data.Webhooks.Payload: data HookCheckSuiteCommit
+ GitHub.Data.Webhooks.Payload: data HookCheckSuiteConclusion
+ GitHub.Data.Webhooks.Payload: data HookCheckSuiteStatus
+ GitHub.Data.Webhooks.Payload: data HookChecksPullRequest
+ GitHub.Data.Webhooks.Payload: data HookChecksPullRequestRepository
+ GitHub.Data.Webhooks.Payload: data HookChecksPullRequestTarget
+ GitHub.Data.Webhooks.Payload: instance Control.DeepSeq.NFData GitHub.Data.Webhooks.Payload.HookCheckRun
+ GitHub.Data.Webhooks.Payload: instance Control.DeepSeq.NFData GitHub.Data.Webhooks.Payload.HookCheckRunConclusion
+ GitHub.Data.Webhooks.Payload: instance Control.DeepSeq.NFData GitHub.Data.Webhooks.Payload.HookCheckRunOutput
+ GitHub.Data.Webhooks.Payload: instance Control.DeepSeq.NFData GitHub.Data.Webhooks.Payload.HookCheckRunRequestedAction
+ GitHub.Data.Webhooks.Payload: instance Control.DeepSeq.NFData GitHub.Data.Webhooks.Payload.HookCheckRunStatus
+ GitHub.Data.Webhooks.Payload: instance Control.DeepSeq.NFData GitHub.Data.Webhooks.Payload.HookCheckSuite
+ GitHub.Data.Webhooks.Payload: instance Control.DeepSeq.NFData GitHub.Data.Webhooks.Payload.HookCheckSuiteCommit
+ GitHub.Data.Webhooks.Payload: instance Control.DeepSeq.NFData GitHub.Data.Webhooks.Payload.HookCheckSuiteConclusion
+ GitHub.Data.Webhooks.Payload: instance Control.DeepSeq.NFData GitHub.Data.Webhooks.Payload.HookCheckSuiteStatus
+ GitHub.Data.Webhooks.Payload: instance Control.DeepSeq.NFData GitHub.Data.Webhooks.Payload.HookChecksInstallation
+ GitHub.Data.Webhooks.Payload: instance Control.DeepSeq.NFData GitHub.Data.Webhooks.Payload.HookChecksPullRequest
+ GitHub.Data.Webhooks.Payload: instance Control.DeepSeq.NFData GitHub.Data.Webhooks.Payload.HookChecksPullRequestRepository
+ GitHub.Data.Webhooks.Payload: instance Control.DeepSeq.NFData GitHub.Data.Webhooks.Payload.HookChecksPullRequestTarget
+ GitHub.Data.Webhooks.Payload: instance Data.Aeson.Types.FromJSON.FromJSON GitHub.Data.Webhooks.Payload.HookCheckRun
+ GitHub.Data.Webhooks.Payload: instance Data.Aeson.Types.FromJSON.FromJSON GitHub.Data.Webhooks.Payload.HookCheckRunConclusion
+ GitHub.Data.Webhooks.Payload: instance Data.Aeson.Types.FromJSON.FromJSON GitHub.Data.Webhooks.Payload.HookCheckRunOutput
+ GitHub.Data.Webhooks.Payload: instance Data.Aeson.Types.FromJSON.FromJSON GitHub.Data.Webhooks.Payload.HookCheckRunRequestedAction
+ GitHub.Data.Webhooks.Payload: instance Data.Aeson.Types.FromJSON.FromJSON GitHub.Data.Webhooks.Payload.HookCheckRunStatus
+ GitHub.Data.Webhooks.Payload: instance Data.Aeson.Types.FromJSON.FromJSON GitHub.Data.Webhooks.Payload.HookCheckSuite
+ GitHub.Data.Webhooks.Payload: instance Data.Aeson.Types.FromJSON.FromJSON GitHub.Data.Webhooks.Payload.HookCheckSuiteCommit
+ GitHub.Data.Webhooks.Payload: instance Data.Aeson.Types.FromJSON.FromJSON GitHub.Data.Webhooks.Payload.HookCheckSuiteConclusion
+ GitHub.Data.Webhooks.Payload: instance Data.Aeson.Types.FromJSON.FromJSON GitHub.Data.Webhooks.Payload.HookCheckSuiteStatus
+ GitHub.Data.Webhooks.Payload: instance Data.Aeson.Types.FromJSON.FromJSON GitHub.Data.Webhooks.Payload.HookChecksInstallation
+ GitHub.Data.Webhooks.Payload: instance Data.Aeson.Types.FromJSON.FromJSON GitHub.Data.Webhooks.Payload.HookChecksPullRequest
+ GitHub.Data.Webhooks.Payload: instance Data.Aeson.Types.FromJSON.FromJSON GitHub.Data.Webhooks.Payload.HookChecksPullRequestRepository
+ GitHub.Data.Webhooks.Payload: instance Data.Aeson.Types.FromJSON.FromJSON GitHub.Data.Webhooks.Payload.HookChecksPullRequestTarget
+ GitHub.Data.Webhooks.Payload: instance Data.Data.Data GitHub.Data.Webhooks.Payload.HookCheckRun
+ GitHub.Data.Webhooks.Payload: instance Data.Data.Data GitHub.Data.Webhooks.Payload.HookCheckRunConclusion
+ GitHub.Data.Webhooks.Payload: instance Data.Data.Data GitHub.Data.Webhooks.Payload.HookCheckRunOutput
+ GitHub.Data.Webhooks.Payload: instance Data.Data.Data GitHub.Data.Webhooks.Payload.HookCheckRunRequestedAction
+ GitHub.Data.Webhooks.Payload: instance Data.Data.Data GitHub.Data.Webhooks.Payload.HookCheckRunStatus
+ GitHub.Data.Webhooks.Payload: instance Data.Data.Data GitHub.Data.Webhooks.Payload.HookCheckSuite
+ GitHub.Data.Webhooks.Payload: instance Data.Data.Data GitHub.Data.Webhooks.Payload.HookCheckSuiteCommit
+ GitHub.Data.Webhooks.Payload: instance Data.Data.Data GitHub.Data.Webhooks.Payload.HookCheckSuiteConclusion
+ GitHub.Data.Webhooks.Payload: instance Data.Data.Data GitHub.Data.Webhooks.Payload.HookCheckSuiteStatus
+ GitHub.Data.Webhooks.Payload: instance Data.Data.Data GitHub.Data.Webhooks.Payload.HookChecksInstallation
+ GitHub.Data.Webhooks.Payload: instance Data.Data.Data GitHub.Data.Webhooks.Payload.HookChecksPullRequest
+ GitHub.Data.Webhooks.Payload: instance Data.Data.Data GitHub.Data.Webhooks.Payload.HookChecksPullRequestRepository
+ GitHub.Data.Webhooks.Payload: instance Data.Data.Data GitHub.Data.Webhooks.Payload.HookChecksPullRequestTarget
+ GitHub.Data.Webhooks.Payload: instance GHC.Classes.Eq GitHub.Data.Webhooks.Payload.HookCheckRun
+ GitHub.Data.Webhooks.Payload: instance GHC.Classes.Eq GitHub.Data.Webhooks.Payload.HookCheckRunConclusion
+ GitHub.Data.Webhooks.Payload: instance GHC.Classes.Eq GitHub.Data.Webhooks.Payload.HookCheckRunOutput
+ GitHub.Data.Webhooks.Payload: instance GHC.Classes.Eq GitHub.Data.Webhooks.Payload.HookCheckRunRequestedAction
+ GitHub.Data.Webhooks.Payload: instance GHC.Classes.Eq GitHub.Data.Webhooks.Payload.HookCheckRunStatus
+ GitHub.Data.Webhooks.Payload: instance GHC.Classes.Eq GitHub.Data.Webhooks.Payload.HookCheckSuite
+ GitHub.Data.Webhooks.Payload: instance GHC.Classes.Eq GitHub.Data.Webhooks.Payload.HookCheckSuiteCommit
+ GitHub.Data.Webhooks.Payload: instance GHC.Classes.Eq GitHub.Data.Webhooks.Payload.HookCheckSuiteConclusion
+ GitHub.Data.Webhooks.Payload: instance GHC.Classes.Eq GitHub.Data.Webhooks.Payload.HookCheckSuiteStatus
+ GitHub.Data.Webhooks.Payload: instance GHC.Classes.Eq GitHub.Data.Webhooks.Payload.HookChecksInstallation
+ GitHub.Data.Webhooks.Payload: instance GHC.Classes.Eq GitHub.Data.Webhooks.Payload.HookChecksPullRequest
+ GitHub.Data.Webhooks.Payload: instance GHC.Classes.Eq GitHub.Data.Webhooks.Payload.HookChecksPullRequestRepository
+ GitHub.Data.Webhooks.Payload: instance GHC.Classes.Eq GitHub.Data.Webhooks.Payload.HookChecksPullRequestTarget
+ GitHub.Data.Webhooks.Payload: instance GHC.Classes.Ord GitHub.Data.Webhooks.Payload.HookCheckRunConclusion
+ GitHub.Data.Webhooks.Payload: instance GHC.Classes.Ord GitHub.Data.Webhooks.Payload.HookCheckRunStatus
+ GitHub.Data.Webhooks.Payload: instance GHC.Classes.Ord GitHub.Data.Webhooks.Payload.HookCheckSuiteConclusion
+ GitHub.Data.Webhooks.Payload: instance GHC.Classes.Ord GitHub.Data.Webhooks.Payload.HookCheckSuiteStatus
+ GitHub.Data.Webhooks.Payload: instance GHC.Generics.Generic GitHub.Data.Webhooks.Payload.HookCheckRun
+ GitHub.Data.Webhooks.Payload: instance GHC.Generics.Generic GitHub.Data.Webhooks.Payload.HookCheckRunConclusion
+ GitHub.Data.Webhooks.Payload: instance GHC.Generics.Generic GitHub.Data.Webhooks.Payload.HookCheckRunOutput
+ GitHub.Data.Webhooks.Payload: instance GHC.Generics.Generic GitHub.Data.Webhooks.Payload.HookCheckRunRequestedAction
+ GitHub.Data.Webhooks.Payload: instance GHC.Generics.Generic GitHub.Data.Webhooks.Payload.HookCheckRunStatus
+ GitHub.Data.Webhooks.Payload: instance GHC.Generics.Generic GitHub.Data.Webhooks.Payload.HookCheckSuite
+ GitHub.Data.Webhooks.Payload: instance GHC.Generics.Generic GitHub.Data.Webhooks.Payload.HookCheckSuiteCommit
+ GitHub.Data.Webhooks.Payload: instance GHC.Generics.Generic GitHub.Data.Webhooks.Payload.HookCheckSuiteConclusion
+ GitHub.Data.Webhooks.Payload: instance GHC.Generics.Generic GitHub.Data.Webhooks.Payload.HookCheckSuiteStatus
+ GitHub.Data.Webhooks.Payload: instance GHC.Generics.Generic GitHub.Data.Webhooks.Payload.HookChecksInstallation
+ GitHub.Data.Webhooks.Payload: instance GHC.Generics.Generic GitHub.Data.Webhooks.Payload.HookChecksPullRequest
+ GitHub.Data.Webhooks.Payload: instance GHC.Generics.Generic GitHub.Data.Webhooks.Payload.HookChecksPullRequestRepository
+ GitHub.Data.Webhooks.Payload: instance GHC.Generics.Generic GitHub.Data.Webhooks.Payload.HookChecksPullRequestTarget
+ GitHub.Data.Webhooks.Payload: instance GHC.Show.Show GitHub.Data.Webhooks.Payload.HookCheckRun
+ GitHub.Data.Webhooks.Payload: instance GHC.Show.Show GitHub.Data.Webhooks.Payload.HookCheckRunConclusion
+ GitHub.Data.Webhooks.Payload: instance GHC.Show.Show GitHub.Data.Webhooks.Payload.HookCheckRunOutput
+ GitHub.Data.Webhooks.Payload: instance GHC.Show.Show GitHub.Data.Webhooks.Payload.HookCheckRunRequestedAction
+ GitHub.Data.Webhooks.Payload: instance GHC.Show.Show GitHub.Data.Webhooks.Payload.HookCheckRunStatus
+ GitHub.Data.Webhooks.Payload: instance GHC.Show.Show GitHub.Data.Webhooks.Payload.HookCheckSuite
+ GitHub.Data.Webhooks.Payload: instance GHC.Show.Show GitHub.Data.Webhooks.Payload.HookCheckSuiteCommit
+ GitHub.Data.Webhooks.Payload: instance GHC.Show.Show GitHub.Data.Webhooks.Payload.HookCheckSuiteConclusion
+ GitHub.Data.Webhooks.Payload: instance GHC.Show.Show GitHub.Data.Webhooks.Payload.HookCheckSuiteStatus
+ GitHub.Data.Webhooks.Payload: instance GHC.Show.Show GitHub.Data.Webhooks.Payload.HookChecksInstallation
+ GitHub.Data.Webhooks.Payload: instance GHC.Show.Show GitHub.Data.Webhooks.Payload.HookChecksPullRequest
+ GitHub.Data.Webhooks.Payload: instance GHC.Show.Show GitHub.Data.Webhooks.Payload.HookChecksPullRequestRepository
+ GitHub.Data.Webhooks.Payload: instance GHC.Show.Show GitHub.Data.Webhooks.Payload.HookChecksPullRequestTarget
+ GitHub.Data.Webhooks.Payload: newtype HookCheckRunRequestedAction
+ GitHub.Data.Webhooks.Payload: newtype HookChecksInstallation
Files
- CHANGELOG.md +4/−0
- fixtures/check-run-event.json +294/−0
- fixtures/check-suite-event.json +223/−0
- github-webhooks.cabal +10/−5
- package.yaml +3/−2
- spec/DecodeEventsSpec.hs +429/−0
- src/GitHub/Data/Webhooks/Events.hs +110/−0
- src/GitHub/Data/Webhooks/Payload.hs +334/−7
- src/GitHub/Data/Webhooks/Secure.hs +3/−0
- stack-examples.yaml +9/−0
- stack-ghc-7.10.yaml +0/−7
- stack-ghc-7.8.yaml +1/−6
- stack-ghc-8.0.yaml +0/−7
- stack-nightly.yaml +1/−0
- stack.yaml +0/−7
CHANGELOG.md view
@@ -1,3 +1,7 @@+# 0.12.0++* Support for CheckSuiteEvent and CheckRunEvent was added (resolves #25)+ # 0.11.0 * OwnerType of Bot is now supported (by Domen Kozar, resolves #22)
+ fixtures/check-run-event.json view
@@ -0,0 +1,294 @@+{+ "action": "requested_action",+ "check_run": {+ "id": 123412411,+ "head_sha": "45deaf5013c757e58e2665849c3fd3add3edfa59",+ "external_id": "",+ "url": "https://api.github.com/repos/baxterthehacker/public-repo/check-runs/454339238",+ "html_url": "https://github.com/baxterthehacker/public-repo/runs/454339238",+ "details_url": "https://www.baxterthehacker.com",+ "status": "completed",+ "conclusion": "stale",+ "started_at": "2020-02-19T02:44:54Z",+ "completed_at": null,+ "output": {+ "title": null,+ "summary": null,+ "text": null,+ "annotations_count": 0,+ "annotations_url": "https://api.github.com/repos/baxterthehacker/public-repo/check-runs/454339238/annotations"+ },+ "name": "Test Check Run",+ "check_suite": {+ "id": 12341234111,+ "head_branch": "test-pr",+ "head_sha": "45deaf5013c757e58e2665849c3fd3add3edfa59",+ "status": "queued",+ "conclusion": null,+ "url": "https://api.github.com/repos/baxterthehacker/public-repo/check-suites/123451234",+ "before": "15c99c3e0b9d840d8465be47813cf39686815f2e",+ "after": "45deaf5013c757e58e2665849c3fd3add3edfa59",+ "pull_requests": [+ {+ "url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1",+ "id": 12345123222,+ "number": 1,+ "head": {+ "ref": "test-pr",+ "sha": "a68c473cf629b651f6e615c7d0eea95811d2db3d",+ "repo": {+ "id": 12345123333,+ "url": "https://api.github.com/repos/baxterthehacker/public-repo",+ "name": "public-repo"+ }+ },+ "base": {+ "ref": "master",+ "sha": "45deaf5013c757e58e2665849c3fd3add3edfa59",+ "repo": {+ "id": 123451234444,+ "url": "https://api.github.com/repos/baxterthehacker/public-repo",+ "name": "public-repo"+ }+ }+ }+ ],+ "app": {+ "id": 12345,+ "slug": "baxterandthehackers-app",+ "owner": {+ "login": "baxterthehacker",+ "id": 12341234,+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjYwMzg1NjM4",+ "avatar_url": "https://avatars2.githubusercontent.com/u/60385638?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/baxterthehacker",+ "html_url": "https://github.com/baxterthehacker",+ "followers_url": "https://api.github.com/users/baxterthehacker/followers",+ "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",+ "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",+ "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",+ "repos_url": "https://api.github.com/users/baxterthehacker/repos",+ "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",+ "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",+ "type": "Organization",+ "site_admin": false+ },+ "name": "Baxterandthehackers App",+ "description": "",+ "external_url": "https://www.baxterthehacker.com",+ "html_url": "https://github.com/apps/baxterandthehackers-app",+ "created_at": "2020-01-19T07:05:42Z",+ "updated_at": "2020-02-18T00:24:52Z",+ "permissions": {+ "checks": "write",+ "issues": "read",+ "metadata": "read"+ },+ "events": [+ "check_run",+ "check_suite"+ ]+ },+ "created_at": "2020-02-18T00:54:04Z",+ "updated_at": "2020-02-18T00:54:04Z"+ },+ "app": {+ "id": 12345,+ "slug": "baxterandthehackers-app",+ "owner": {+ "login": "baxterthehacker",+ "id": 12341234,+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjYwMzg1NjM4",+ "avatar_url": "https://avatars2.githubusercontent.com/u/60385638?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/baxterthehacker",+ "html_url": "https://github.com/baxterthehacker",+ "followers_url": "https://api.github.com/users/baxterthehacker/followers",+ "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",+ "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",+ "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",+ "repos_url": "https://api.github.com/users/baxterthehacker/repos",+ "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",+ "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",+ "type": "Organization",+ "site_admin": false+ },+ "name": "Baxterandthehackers App",+ "description": "",+ "external_url": "https://www.baxterthehacker.com",+ "html_url": "https://github.com/apps/baxterandthehackers-app",+ "created_at": "2020-01-19T07:05:42Z",+ "updated_at": "2020-02-18T00:24:52Z",+ "permissions": {+ "checks": "write",+ "issues": "read",+ "metadata": "read"+ },+ "events": [+ "check_run",+ "check_suite"+ ]+ },+ "pull_requests": [+ {+ "url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1",+ "id": 12345123222,+ "number": 1,+ "head": {+ "ref": "test-pr",+ "sha": "a68c473cf629b651f6e615c7d0eea95811d2db3d",+ "repo": {+ "id": 12345123333,+ "url": "https://api.github.com/repos/baxterthehacker/public-repo",+ "name": "public-repo"+ }+ },+ "base": {+ "ref": "master",+ "sha": "45deaf5013c757e58e2665849c3fd3add3edfa59",+ "repo": {+ "id": 123451234444,+ "url": "https://api.github.com/repos/baxterthehacker/public-repo",+ "name": "public-repo"+ }+ }+ }+ ]+ },+ "requested_action": {+ "identifier": "fix_errors"+ },+ "repository": {+ "id": 35129377,+ "name": "public-repo",+ "full_name": "baxterthehacker/public-repo",+ "private": false,+ "owner": {+ "login": "baxterthehacker",+ "id": 6752317,+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjYwMzg1NjM4",+ "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",+ "gravatar_id": "",+ "url": "https://api.github.com/users/baxterthehacker",+ "html_url": "https://github.com/baxterthehacker",+ "followers_url": "https://api.github.com/users/baxterthehacker/followers",+ "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",+ "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",+ "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",+ "repos_url": "https://api.github.com/users/baxterthehacker/repos",+ "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",+ "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",+ "type": "Organization",+ "site_admin": false+ },+ "html_url": "https://github.com/baxterthehacker/public-repo",+ "description": null,+ "fork": false,+ "url": "https://api.github.com/repos/baxterthehacker/public-repo",+ "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks",+ "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams",+ "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks",+ "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}",+ "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events",+ "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}",+ "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}",+ "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags",+ "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages",+ "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers",+ "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors",+ "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers",+ "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription",+ "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}",+ "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges",+ "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads",+ "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}",+ "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}",+ "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}",+ "deployments_url": "https://api.github.com/repos/baxterthehacker/public-repo/deployments",+ "created_at": "2015-05-05T23:40:12Z",+ "updated_at": "2015-05-05T23:40:12Z",+ "pushed_at": "2015-05-05T23:40:27Z",+ "git_url": "git://github.com/baxterthehacker/public-repo.git",+ "ssh_url": "git@github.com:baxterthehacker/public-repo.git",+ "clone_url": "https://github.com/baxterthehacker/public-repo.git",+ "svn_url": "https://github.com/baxterthehacker/public-repo",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": null,+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": true,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 2,+ "license": null,+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "master"+ },+ "organization": {+ "login": "baxterandthehackers",+ "id": 4312013,+ "url": "https://api.github.com/orgs/baxterandthehackers",+ "repos_url": "https://api.github.com/orgs/baxterandthehackers/repos",+ "events_url": "https://api.github.com/orgs/baxterandthehackers/events",+ "hooks_url": "https://api.github.com/orgs/baxterandthehackers/hooks",+ "issues_url": "https://api.github.com/orgs/baxterandthehackers/issues",+ "members_url": "https://api.github.com/orgs/baxterandthehackers/members{/member}",+ "public_members_url": "https://api.github.com/orgs/baxterandthehackers/public_members{/member}",+ "avatar_url": "https://avatars.githubusercontent.com/u/4312013?v=3",+ "description": null+ },+ "sender":{+ "login":"baxterthehacker",+ "id":6752317,+ "avatar_url":"https://avatars.githubusercontent.com/u/6752317?v=3",+ "gravatar_id":"",+ "url":"https://api.github.com/users/baxterthehacker",+ "html_url":"https://github.com/baxterthehacker",+ "followers_url":"https://api.github.com/users/baxterthehacker/followers",+ "following_url":"https://api.github.com/users/baxterthehacker/following{/other_user}",+ "gists_url":"https://api.github.com/users/baxterthehacker/gists{/gist_id}",+ "starred_url":"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",+ "subscriptions_url":"https://api.github.com/users/baxterthehacker/subscriptions",+ "organizations_url":"https://api.github.com/users/baxterthehacker/orgs",+ "repos_url":"https://api.github.com/users/baxterthehacker/repos",+ "events_url":"https://api.github.com/users/baxterthehacker/events{/privacy}",+ "received_events_url":"https://api.github.com/users/baxterthehacker/received_events",+ "type":"User",+ "site_admin":false+ },+ "installation": {+ "id": 1234123+ }+}
+ fixtures/check-suite-event.json view
@@ -0,0 +1,223 @@+{+ "action": "completed",+ "check_suite": {+ "id": 12341234111,+ "head_branch": "test-pr",+ "head_sha": "45deaf5013c757e58e2665849c3fd3add3edfa59",+ "status": "completed",+ "conclusion": "action_required",+ "url": "https://api.github.com/repos/baxterthehacker/public-repo/check-suites/123451234",+ "before": "15c99c3e0b9d840d8465be47813cf39686815f2e",+ "after": "45deaf5013c757e58e2665849c3fd3add3edfa59",+ "pull_requests": [+ {+ "url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1",+ "id": 12345123222,+ "number": 1,+ "head": {+ "ref": "test-pr",+ "sha": "a68c473cf629b651f6e615c7d0eea95811d2db3d",+ "repo": {+ "id": 12345123333,+ "url": "https://api.github.com/repos/baxterthehacker/public-repo",+ "name": "public-repo"+ }+ },+ "base": {+ "ref": "master",+ "sha": "45deaf5013c757e58e2665849c3fd3add3edfa59",+ "repo": {+ "id": 123451234444,+ "url": "https://api.github.com/repos/baxterthehacker/public-repo",+ "name": "public-repo"+ }+ }+ }+ ],+ "app": {+ "id": 12345,+ "slug": "baxterandthehackers-app",+ "owner": {+ "login": "baxterthehacker",+ "id": 12341234,+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjYwMzg1NjM4",+ "avatar_url": "https://avatars2.githubusercontent.com/u/60385638?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/baxterthehacker",+ "html_url": "https://github.com/baxterthehacker",+ "followers_url": "https://api.github.com/users/baxterthehacker/followers",+ "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",+ "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",+ "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",+ "repos_url": "https://api.github.com/users/baxterthehacker/repos",+ "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",+ "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",+ "type": "Organization",+ "site_admin": false+ },+ "name": "Baxterandthehackers App",+ "description": "",+ "external_url": "https://www.baxterthehacker.com",+ "html_url": "https://github.com/apps/baxterandthehackers-app",+ "created_at": "2020-01-19T07:05:42Z",+ "updated_at": "2020-02-18T00:24:52Z",+ "permissions": {+ "checks": "write",+ "issues": "read",+ "metadata": "read"+ },+ "events": [+ "check_run",+ "check_suite"+ ]+ },+ "created_at": "2020-02-18T00:54:04Z",+ "updated_at": "2020-02-18T00:54:04Z",+ "latest_check_runs_count": 0,+ "check_runs_url": "https://api.github.com/repos/baxterthehacker/public-repo/check-suites/12341234111/check-runs",+ "head_commit": {+ "id": "45deaf5013c757e58e2665849c3fd3add3edfa59",+ "tree_id": "7eccf45e2908e97540ab6b4d6ce849f0a7c0cfca",+ "message": "Update README.md",+ "timestamp": "2020-02-18T00:53:59Z",+ "author": {+ "name": "baxterthehacker",+ "email": "baxterthehacker@users.noreply.github.com"+ },+ "committer": {+ "name": "baxterthehacker",+ "email": "baxterthehacker@users.noreply.github.com"+ }+ }+ },+ "repository": {+ "id": 35129377,+ "name": "public-repo",+ "full_name": "baxterthehacker/public-repo",+ "private": false,+ "owner": {+ "login": "baxterthehacker",+ "id": 6752317,+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjYwMzg1NjM4",+ "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",+ "gravatar_id": "",+ "url": "https://api.github.com/users/baxterthehacker",+ "html_url": "https://github.com/baxterthehacker",+ "followers_url": "https://api.github.com/users/baxterthehacker/followers",+ "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",+ "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",+ "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",+ "repos_url": "https://api.github.com/users/baxterthehacker/repos",+ "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",+ "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",+ "type": "Organization",+ "site_admin": false+ },+ "html_url": "https://github.com/baxterthehacker/public-repo",+ "description": null,+ "fork": false,+ "url": "https://api.github.com/repos/baxterthehacker/public-repo",+ "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks",+ "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams",+ "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks",+ "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}",+ "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events",+ "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}",+ "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}",+ "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags",+ "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages",+ "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers",+ "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors",+ "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers",+ "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription",+ "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}",+ "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges",+ "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads",+ "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}",+ "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}",+ "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}",+ "deployments_url": "https://api.github.com/repos/baxterthehacker/public-repo/deployments",+ "created_at": "2015-05-05T23:40:12Z",+ "updated_at": "2015-05-05T23:40:12Z",+ "pushed_at": "2015-05-05T23:40:27Z",+ "git_url": "git://github.com/baxterthehacker/public-repo.git",+ "ssh_url": "git@github.com:baxterthehacker/public-repo.git",+ "clone_url": "https://github.com/baxterthehacker/public-repo.git",+ "svn_url": "https://github.com/baxterthehacker/public-repo",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": null,+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": true,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 2,+ "license": null,+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "master"+ },+ "organization": {+ "login": "baxterandthehackers",+ "id": 4312013,+ "url": "https://api.github.com/orgs/baxterandthehackers",+ "repos_url": "https://api.github.com/orgs/baxterandthehackers/repos",+ "events_url": "https://api.github.com/orgs/baxterandthehackers/events",+ "hooks_url": "https://api.github.com/orgs/baxterandthehackers/hooks",+ "issues_url": "https://api.github.com/orgs/baxterandthehackers/issues",+ "members_url": "https://api.github.com/orgs/baxterandthehackers/members{/member}",+ "public_members_url": "https://api.github.com/orgs/baxterandthehackers/public_members{/member}",+ "avatar_url": "https://avatars.githubusercontent.com/u/4312013?v=3",+ "description": null+ },+ "sender":{+ "login":"baxterthehacker",+ "id":6752317,+ "avatar_url":"https://avatars.githubusercontent.com/u/6752317?v=3",+ "gravatar_id":"",+ "url":"https://api.github.com/users/baxterthehacker",+ "html_url":"https://github.com/baxterthehacker",+ "followers_url":"https://api.github.com/users/baxterthehacker/followers",+ "following_url":"https://api.github.com/users/baxterthehacker/following{/other_user}",+ "gists_url":"https://api.github.com/users/baxterthehacker/gists{/gist_id}",+ "starred_url":"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",+ "subscriptions_url":"https://api.github.com/users/baxterthehacker/subscriptions",+ "organizations_url":"https://api.github.com/users/baxterthehacker/orgs",+ "repos_url":"https://api.github.com/users/baxterthehacker/repos",+ "events_url":"https://api.github.com/users/baxterthehacker/events{/privacy}",+ "received_events_url":"https://api.github.com/users/baxterthehacker/received_events",+ "type":"User",+ "site_admin":false+ },+ "installation": {+ "id": 1234123+ }+}
github-webhooks.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: a6f178730e675270b0f0ac76e237c8ff5d6da7610a4a7a9b552cb2d78e5d1a03+-- hash: 32ae0990f7bb06821c7e8a6dc533f28f086bf605fda8ca884645551dad3ae3f7 name: github-webhooks-version: 0.11.0+version: 0.12.0 synopsis: Aeson instances for GitHub Webhook payloads. description: Complete instances for decoding GitHub Webhook payloads (using @aeson@). See the README at <https://github.com/onrock-eng/github-webhooks#readme> for examples. category: GitHub@@ -17,7 +17,8 @@ Christian Sakai <christianmsakai@gmail.com>, Thomas DuBuisson <thomas.dubuisson@gmail.com>, Rob Berry,- Domen Kozar <domen@dev.si>+ Domen Kozar <domen@dev.si>,+ Alistair Burrowes maintainer: Kyle Van Berendonck <foss@onrock.online> copyright: (c) 2017-2019 ONROCK license: MIT@@ -26,10 +27,14 @@ extra-source-files: package.yaml stack.yaml+ stack-examples.yaml stack-ghc-7.10.yaml stack-ghc-7.8.yaml stack-ghc-8.0.yaml+ stack-nightly.yaml CHANGELOG.md+ fixtures/check-run-event.json+ fixtures/check-suite-event.json fixtures/commit-comment-event.json fixtures/create-event.json fixtures/delete-event.json@@ -90,7 +95,7 @@ , time , vector if flag(ci)- ghc-options: -Wall -Werror -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -ddump-to-file -ddump-hi+ ghc-options: -Wall -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -ddump-to-file -ddump-hi exposed-modules: GitHub.Data.Webhooks.Events GitHub.Data.Webhooks.Payload@@ -114,7 +119,7 @@ , text , vector if flag(ci)- ghc-options: -Wall -Werror -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -ddump-to-file -ddump-hi+ ghc-options: -Wall -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -ddump-to-file -ddump-hi other-modules: DecodeEventsSpec Paths_github_webhooks
package.yaml view
@@ -1,5 +1,5 @@ name: github-webhooks-version: 0.11.0+version: 0.12.0 category: GitHub license: MIT@@ -17,6 +17,7 @@ - Thomas DuBuisson <thomas.dubuisson@gmail.com> - Rob Berry - Domen Kozar <domen@dev.si>+ - Alistair Burrowes maintainer: Kyle Van Berendonck <foss@onrock.online> github: onrock-eng/github-webhooks description:@@ -31,7 +32,7 @@ when: - condition: flag(ci)- ghc-options: -Wall -Werror -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -ddump-to-file -ddump-hi+ ghc-options: -Wall -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -ddump-to-file -ddump-hi default-extensions: - DeriveDataTypeable
spec/DecodeEventsSpec.hs view
@@ -39,6 +39,8 @@ spec :: Spec spec = do+ it "can decode CheckSuiteEvent" $ fixtureShouldMatch "fixtures/check-suite-event.json" checkSuiteEventFixture+ it "can decode CheckRunEvent" $ fixtureShouldMatch "fixtures/check-run-event.json" checkRunEventFixture it "can decode CommitCommentEvent" $ fixtureShouldMatch "fixtures/commit-comment-event.json" commitCommentEventFixture it "can decode CreateEvent" $ fixtureShouldMatch "fixtures/create-event.json" createEventFixture it "can decode DeleteEvent" $ fixtureShouldMatch "fixtures/delete-event.json" deleteEventFixture@@ -76,6 +78,433 @@ -- Fixtures -- These correspond to the expected decoded output of the above JSON files.++checkSuiteEventFixture :: CheckSuiteEvent+checkSuiteEventFixture = CheckSuiteEvent+ { evCheckSuiteAction = CheckSuiteEventActionCompleted+ , evCheckSuiteCheckSuite =+ HookCheckSuite+ { whCheckSuiteId = 12341234111+ , whCheckSuiteHeadBranch = Just "test-pr"+ , whCheckSuiteHeadSha = "45deaf5013c757e58e2665849c3fd3add3edfa59"+ , whCheckSuiteStatus = HookCheckSuiteStatusCompleted+ , whCheckSuiteConclusion = Just HookCheckSuiteConclusionActionRequired+ , whCheckSuiteUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/check-suites/123451234"+ , whCheckSuiteBeforeSha = Just "15c99c3e0b9d840d8465be47813cf39686815f2e"+ , whCheckSuiteAfterSha = "45deaf5013c757e58e2665849c3fd3add3edfa59"+ , whCheckSuitePullRequests =+ V.fromList [+ HookChecksPullRequest+ { whChecksPullRequestUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1"+ , whChecksPullRequestId = 12345123222+ , whChecksPullRequestNumber = 1+ , whChecksPullRequestHead =+ HookChecksPullRequestTarget+ { whChecksPullRequestTargetSha = "a68c473cf629b651f6e615c7d0eea95811d2db3d"+ , whChecksPullRequestTargetRef = "test-pr"+ , whChecksPullRequestTargetRepo =+ HookChecksPullRequestRepository+ { whChecksPullRequestRepositoryId = 12345123333+ , whChecksPullRequestRepositoryUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo"+ , whChecksPullRequestRepositoryName = "public-repo"+ }+ }+ , whChecksPullRequestBase =+ HookChecksPullRequestTarget+ { whChecksPullRequestTargetSha = "45deaf5013c757e58e2665849c3fd3add3edfa59"+ , whChecksPullRequestTargetRef = "master"+ , whChecksPullRequestTargetRepo =+ HookChecksPullRequestRepository+ { whChecksPullRequestRepositoryId = 123451234444+ , whChecksPullRequestRepositoryUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo"+ , whChecksPullRequestRepositoryName = "public-repo"+ }+ }+ }+ ]+ , whCheckSuiteCreatedAt = read "2020-02-18 00:54:04"+ , whCheckSuiteUpdatedAt = read "2020-02-18 00:54:04"+ , whCheckSuiteLatestCheckRunsCount = Just 0+ , whCheckSuiteCheckRunsUrl = Just (URL "https://api.github.com/repos/baxterthehacker/public-repo/check-suites/12341234111/check-runs")+ , whCheckSuiteHeadCommit =+ Just+ HookCheckSuiteCommit+ { whCheckSuiteCommitSha = "45deaf5013c757e58e2665849c3fd3add3edfa59"+ , whCheckSuiteCommitAuthor =+ HookSimpleUser+ { whSimplUserName = "baxterthehacker"+ , whSimplUserEmail = "baxterthehacker@users.noreply.github.com"+ , whSimplUserLogin = Nothing+ }+ , whCheckSuiteCommitCommitter =+ HookSimpleUser+ { whSimplUserName = "baxterthehacker"+ , whSimplUserEmail = "baxterthehacker@users.noreply.github.com"+ , whSimplUserLogin = Nothing+ }+ }+ }+ , evCheckSuiteRepository =+ HookRepository+ { whRepoId = 35129377+ , whRepoName = "public-repo"+ , whRepoFullName = "baxterthehacker/public-repo"+ , whRepoOwner =+ Right HookUser+ { whUserLogin = "baxterthehacker"+ , whUserId = 6752317+ , whUserAvatarUrl = URL "https://avatars.githubusercontent.com/u/6752317?v=3"+ , whUserGravatarId = URL ""+ , whUserUrl = URL "https://api.github.com/users/baxterthehacker"+ , whUserHtmlUrl = URL "https://github.com/baxterthehacker"+ , whUserFollowersUrl = URL "https://api.github.com/users/baxterthehacker/followers"+ , whUserFollowingUrl = URL "https://api.github.com/users/baxterthehacker/following{/other_user}"+ , whUserGistsUrl = URL "https://api.github.com/users/baxterthehacker/gists{/gist_id}"+ , whUserStarredUrl = URL "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}"+ , whUserSubscriptionsUrl = URL "https://api.github.com/users/baxterthehacker/subscriptions"+ , whUserOrganizationsUrl = URL "https://api.github.com/users/baxterthehacker/orgs"+ , whUserReposUrl = URL "https://api.github.com/users/baxterthehacker/repos"+ , whUserEventsUrl = URL "https://api.github.com/users/baxterthehacker/events{/privacy}"+ , whUserReceivedEventsUrl = URL "https://api.github.com/users/baxterthehacker/received_events"+ , whUserType = OwnerOrganization+ , whUserIsAdminOfSite = False+ }+ , whRepoIsPrivate = False+ , whRepoHtmlUrl = URL "https://github.com/baxterthehacker/public-repo"+ , whRepoDescription = ""+ , whRepoIsAFork = False+ , whRepoUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo"+ , whRepoForksUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/forks"+ , whRepoKeysUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}"+ , whRepoCollaboratorsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}"+ , whRepoTeamsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/teams"+ , whRepoHooksUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/hooks"+ , whRepoIssueEventsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}"+ , whRepoEventsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/events"+ , whRepoAssigneesUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}"+ , whRepoBranchesUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}"+ , whRepoTagsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/tags"+ , whRepoBlobsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}"+ , whRepoGitTagsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}"+ , whRepoGitRefsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}"+ , whRepoTreesUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}"+ , whRepoStatusesUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}"+ , whRepoLanguagesUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/languages"+ , whRepoStargazersUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/stargazers"+ , whRepoContributorsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/contributors"+ , whRepoSubscribersUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/subscribers"+ , whRepoSubscriptionUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/subscription"+ , whRepoCommitsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}"+ , whRepoGitCommitsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}"+ , whRepoCommentsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}"+ , whRepoIssueCommentsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}"+ , whRepoContentsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}"+ , whRepoCompareUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}"+ , whRepoMergesUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/merges"+ , whRepoArchiveUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}"+ , whRepoDownloadsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/downloads"+ , whRepoIssuesUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}"+ , whRepoPullsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}"+ , whRepoMilestonesUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}"+ , whRepoNotificationsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}"+ , whRepoLabelsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}"+ , whRepoReleasesUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}"+ , whRepoCreatedAt = read "2015-05-05 23:40:12"+ , whRepoUpdatedAt = read "2015-05-05 23:40:12"+ , whRepoPushedAt = read "2015-05-05 23:40:27"+ , whRepoGitUrl = URL "git://github.com/baxterthehacker/public-repo.git"+ , whRepoSshUrl = URL "git@github.com:baxterthehacker/public-repo.git"+ , whRepoCloneUrl = URL "https://github.com/baxterthehacker/public-repo.git"+ , whRepoSvnUrl = URL "https://github.com/baxterthehacker/public-repo"+ , whRepoHomepage = Nothing+ , whRepoSize = 0+ , whRepoStargazersCount = 0+ , whRepoWatchersCount = 0+ , whRepoLanguage = Nothing+ , whRepoHasIssues = True+ , whRepoHasDownloads = True+ , whRepoHasWiki = True+ , whRepoHasPages = True+ , whRepoForkCount = 0+ , whRepoMirrorUrl = Nothing+ , whRepoOpenIssuesCount = 2+ , whRepoDefaultBranchName = "master"+ }+ , evCheckSuiteOrganization =+ Just+ HookOrganization+ { whOrgLogin = "baxterandthehackers"+ , whOrgId = 4312013+ , whOrgUrl = URL "https://api.github.com/orgs/baxterandthehackers"+ , whOrgReposUrl = URL "https://api.github.com/orgs/baxterandthehackers/repos"+ , whOrgEventsUrl = URL "https://api.github.com/orgs/baxterandthehackers/events"+ , whOrgHooksUrl = Just (URL "https://api.github.com/orgs/baxterandthehackers/hooks")+ , whOrgIssuesUrl = Just (URL "https://api.github.com/orgs/baxterandthehackers/issues")+ , whOrgMembersUrl = URL "https://api.github.com/orgs/baxterandthehackers/members{/member}"+ , whOrgPublicMembersUrl = URL "https://api.github.com/orgs/baxterandthehackers/public_members{/member}"+ , whOrgAvatarUrl = URL "https://avatars.githubusercontent.com/u/4312013?v=3"+ , whOrgDescription = T.empty+ }+ , evCheckSuiteSender =+ HookUser+ { whUserLogin = "baxterthehacker"+ , whUserId = 6752317+ , whUserAvatarUrl = URL "https://avatars.githubusercontent.com/u/6752317?v=3"+ , whUserGravatarId = URL ""+ , whUserUrl = URL "https://api.github.com/users/baxterthehacker"+ , whUserHtmlUrl = URL "https://github.com/baxterthehacker"+ , whUserFollowersUrl = URL "https://api.github.com/users/baxterthehacker/followers"+ , whUserFollowingUrl = URL "https://api.github.com/users/baxterthehacker/following{/other_user}"+ , whUserGistsUrl = URL "https://api.github.com/users/baxterthehacker/gists{/gist_id}"+ , whUserStarredUrl = URL "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}"+ , whUserSubscriptionsUrl = URL "https://api.github.com/users/baxterthehacker/subscriptions"+ , whUserOrganizationsUrl = URL "https://api.github.com/users/baxterthehacker/orgs"+ , whUserReposUrl = URL "https://api.github.com/users/baxterthehacker/repos"+ , whUserEventsUrl = URL "https://api.github.com/users/baxterthehacker/events{/privacy}"+ , whUserReceivedEventsUrl = URL "https://api.github.com/users/baxterthehacker/received_events"+ , whUserType = OwnerUser+ , whUserIsAdminOfSite = False+ }+ , evCheckSuiteInstallation =+ Just+ HookChecksInstallation+ { whChecksInstallationId = 1234123+ }+ }++checkRunEventFixture :: CheckRunEvent+checkRunEventFixture = CheckRunEvent+ { evCheckRunAction = CheckRunEventActionRequestedAction+ , evCheckRunCheckRun =+ HookCheckRun+ { whCheckRunId = 123412411+ , whCheckRunHeadSha = "45deaf5013c757e58e2665849c3fd3add3edfa59"+ , whCheckRunExternalId = ""+ , whCheckRunUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/check-runs/454339238"+ , whCheckRunHtmlUrl = URL"https://github.com/baxterthehacker/public-repo/runs/454339238"+ , whCheckRunDetailsUrl = URL "https://www.baxterthehacker.com"+ , whCheckRunStatus = HookCheckRunStatusCompleted+ , whCheckRunConclusion = Just HookCheckRunConclusionStale+ , whCheckRunStartedAt = read "2020-02-19 02:44:54"+ , whCheckRunCompletedAt = Nothing+ , whCheckRunOutput =+ HookCheckRunOutput+ { whCheckRunOutputTitle = Nothing+ , whCheckRunOutputSummary = Nothing+ , whCheckRunOutputText = Nothing+ , whCheckRunOutputAnnotationsCount = 0+ , whCheckRunOutputAnnotationsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/check-runs/454339238/annotations"+ }+ , whCheckRunName = "Test Check Run"+ , weCheckRunCheckSuite =+ HookCheckSuite+ { whCheckSuiteId = 12341234111+ , whCheckSuiteHeadBranch = Just "test-pr"+ , whCheckSuiteHeadSha = "45deaf5013c757e58e2665849c3fd3add3edfa59"+ , whCheckSuiteStatus = HookCheckSuiteStatusQueued+ , whCheckSuiteConclusion = Nothing+ , whCheckSuiteUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/check-suites/123451234"+ , whCheckSuiteBeforeSha = Just "15c99c3e0b9d840d8465be47813cf39686815f2e"+ , whCheckSuiteAfterSha = "45deaf5013c757e58e2665849c3fd3add3edfa59"+ , whCheckSuitePullRequests =+ V.fromList [+ HookChecksPullRequest+ { whChecksPullRequestUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1"+ , whChecksPullRequestId = 12345123222+ , whChecksPullRequestNumber = 1+ , whChecksPullRequestHead =+ HookChecksPullRequestTarget+ { whChecksPullRequestTargetSha = "a68c473cf629b651f6e615c7d0eea95811d2db3d"+ , whChecksPullRequestTargetRef = "test-pr"+ , whChecksPullRequestTargetRepo =+ HookChecksPullRequestRepository+ { whChecksPullRequestRepositoryId = 12345123333+ , whChecksPullRequestRepositoryUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo"+ , whChecksPullRequestRepositoryName = "public-repo"+ }+ }+ , whChecksPullRequestBase =+ HookChecksPullRequestTarget+ { whChecksPullRequestTargetSha = "45deaf5013c757e58e2665849c3fd3add3edfa59"+ , whChecksPullRequestTargetRef = "master"+ , whChecksPullRequestTargetRepo =+ HookChecksPullRequestRepository+ { whChecksPullRequestRepositoryId = 123451234444+ , whChecksPullRequestRepositoryUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo"+ , whChecksPullRequestRepositoryName = "public-repo"+ }+ }+ }+ ]+ , whCheckSuiteCreatedAt = read "2020-02-18 00:54:04"+ , whCheckSuiteUpdatedAt = read "2020-02-18 00:54:04"+ , whCheckSuiteLatestCheckRunsCount = Nothing+ , whCheckSuiteCheckRunsUrl = Nothing+ , whCheckSuiteHeadCommit = Nothing+ }+ , whCheckRunPullRequests =+ V.fromList [+ HookChecksPullRequest+ { whChecksPullRequestUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1"+ , whChecksPullRequestId = 12345123222+ , whChecksPullRequestNumber = 1+ , whChecksPullRequestHead =+ HookChecksPullRequestTarget+ { whChecksPullRequestTargetSha = "a68c473cf629b651f6e615c7d0eea95811d2db3d"+ , whChecksPullRequestTargetRef = "test-pr"+ , whChecksPullRequestTargetRepo =+ HookChecksPullRequestRepository+ { whChecksPullRequestRepositoryId = 12345123333+ , whChecksPullRequestRepositoryUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo"+ , whChecksPullRequestRepositoryName = "public-repo"+ }+ }+ , whChecksPullRequestBase =+ HookChecksPullRequestTarget+ { whChecksPullRequestTargetSha = "45deaf5013c757e58e2665849c3fd3add3edfa59"+ , whChecksPullRequestTargetRef = "master"+ , whChecksPullRequestTargetRepo =+ HookChecksPullRequestRepository+ { whChecksPullRequestRepositoryId = 123451234444+ , whChecksPullRequestRepositoryUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo"+ , whChecksPullRequestRepositoryName = "public-repo"+ }+ }+ }+ ]+ }+ , evCheckRunRequestedAction =+ Just+ HookCheckRunRequestedAction+ { whCheckRunRequestedActionIdentifier = "fix_errors"+ }+ , evCheckRunRepository =+ HookRepository+ { whRepoId = 35129377+ , whRepoName = "public-repo"+ , whRepoFullName = "baxterthehacker/public-repo"+ , whRepoOwner =+ Right HookUser+ { whUserLogin = "baxterthehacker"+ , whUserId = 6752317+ , whUserAvatarUrl = URL "https://avatars.githubusercontent.com/u/6752317?v=3"+ , whUserGravatarId = URL ""+ , whUserUrl = URL "https://api.github.com/users/baxterthehacker"+ , whUserHtmlUrl = URL "https://github.com/baxterthehacker"+ , whUserFollowersUrl = URL "https://api.github.com/users/baxterthehacker/followers"+ , whUserFollowingUrl = URL "https://api.github.com/users/baxterthehacker/following{/other_user}"+ , whUserGistsUrl = URL "https://api.github.com/users/baxterthehacker/gists{/gist_id}"+ , whUserStarredUrl = URL "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}"+ , whUserSubscriptionsUrl = URL "https://api.github.com/users/baxterthehacker/subscriptions"+ , whUserOrganizationsUrl = URL "https://api.github.com/users/baxterthehacker/orgs"+ , whUserReposUrl = URL "https://api.github.com/users/baxterthehacker/repos"+ , whUserEventsUrl = URL "https://api.github.com/users/baxterthehacker/events{/privacy}"+ , whUserReceivedEventsUrl = URL "https://api.github.com/users/baxterthehacker/received_events"+ , whUserType = OwnerOrganization+ , whUserIsAdminOfSite = False+ }+ , whRepoIsPrivate = False+ , whRepoHtmlUrl = URL "https://github.com/baxterthehacker/public-repo"+ , whRepoDescription = ""+ , whRepoIsAFork = False+ , whRepoUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo"+ , whRepoForksUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/forks"+ , whRepoKeysUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}"+ , whRepoCollaboratorsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}"+ , whRepoTeamsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/teams"+ , whRepoHooksUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/hooks"+ , whRepoIssueEventsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}"+ , whRepoEventsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/events"+ , whRepoAssigneesUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}"+ , whRepoBranchesUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}"+ , whRepoTagsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/tags"+ , whRepoBlobsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}"+ , whRepoGitTagsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}"+ , whRepoGitRefsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}"+ , whRepoTreesUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}"+ , whRepoStatusesUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}"+ , whRepoLanguagesUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/languages"+ , whRepoStargazersUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/stargazers"+ , whRepoContributorsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/contributors"+ , whRepoSubscribersUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/subscribers"+ , whRepoSubscriptionUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/subscription"+ , whRepoCommitsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}"+ , whRepoGitCommitsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}"+ , whRepoCommentsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}"+ , whRepoIssueCommentsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}"+ , whRepoContentsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}"+ , whRepoCompareUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}"+ , whRepoMergesUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/merges"+ , whRepoArchiveUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}"+ , whRepoDownloadsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/downloads"+ , whRepoIssuesUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}"+ , whRepoPullsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}"+ , whRepoMilestonesUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}"+ , whRepoNotificationsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}"+ , whRepoLabelsUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}"+ , whRepoReleasesUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}"+ , whRepoCreatedAt = read "2015-05-05 23:40:12"+ , whRepoUpdatedAt = read "2015-05-05 23:40:12"+ , whRepoPushedAt = read "2015-05-05 23:40:27"+ , whRepoGitUrl = URL "git://github.com/baxterthehacker/public-repo.git"+ , whRepoSshUrl = URL "git@github.com:baxterthehacker/public-repo.git"+ , whRepoCloneUrl = URL "https://github.com/baxterthehacker/public-repo.git"+ , whRepoSvnUrl = URL "https://github.com/baxterthehacker/public-repo"+ , whRepoHomepage = Nothing+ , whRepoSize = 0+ , whRepoStargazersCount = 0+ , whRepoWatchersCount = 0+ , whRepoLanguage = Nothing+ , whRepoHasIssues = True+ , whRepoHasDownloads = True+ , whRepoHasWiki = True+ , whRepoHasPages = True+ , whRepoForkCount = 0+ , whRepoMirrorUrl = Nothing+ , whRepoOpenIssuesCount = 2+ , whRepoDefaultBranchName = "master"+ }+ , evCheckRunOrganization =+ Just+ HookOrganization+ { whOrgLogin = "baxterandthehackers"+ , whOrgId = 4312013+ , whOrgUrl = URL "https://api.github.com/orgs/baxterandthehackers"+ , whOrgReposUrl = URL "https://api.github.com/orgs/baxterandthehackers/repos"+ , whOrgEventsUrl = URL "https://api.github.com/orgs/baxterandthehackers/events"+ , whOrgHooksUrl = Just (URL "https://api.github.com/orgs/baxterandthehackers/hooks")+ , whOrgIssuesUrl = Just (URL "https://api.github.com/orgs/baxterandthehackers/issues")+ , whOrgMembersUrl = URL "https://api.github.com/orgs/baxterandthehackers/members{/member}"+ , whOrgPublicMembersUrl = URL "https://api.github.com/orgs/baxterandthehackers/public_members{/member}"+ , whOrgAvatarUrl = URL "https://avatars.githubusercontent.com/u/4312013?v=3"+ , whOrgDescription = T.empty+ }+ , evCheckRunSender =+ HookUser+ { whUserLogin = "baxterthehacker"+ , whUserId = 6752317+ , whUserAvatarUrl = URL "https://avatars.githubusercontent.com/u/6752317?v=3"+ , whUserGravatarId = URL ""+ , whUserUrl = URL "https://api.github.com/users/baxterthehacker"+ , whUserHtmlUrl = URL "https://github.com/baxterthehacker"+ , whUserFollowersUrl = URL "https://api.github.com/users/baxterthehacker/followers"+ , whUserFollowingUrl = URL "https://api.github.com/users/baxterthehacker/following{/other_user}"+ , whUserGistsUrl = URL "https://api.github.com/users/baxterthehacker/gists{/gist_id}"+ , whUserStarredUrl = URL "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}"+ , whUserSubscriptionsUrl = URL "https://api.github.com/users/baxterthehacker/subscriptions"+ , whUserOrganizationsUrl = URL "https://api.github.com/users/baxterthehacker/orgs"+ , whUserReposUrl = URL "https://api.github.com/users/baxterthehacker/repos"+ , whUserEventsUrl = URL "https://api.github.com/users/baxterthehacker/events{/privacy}"+ , whUserReceivedEventsUrl = URL "https://api.github.com/users/baxterthehacker/received_events"+ , whUserType = OwnerUser+ , whUserIsAdminOfSite = False+ }+ , evCheckRunInstallation =+ Just+ HookChecksInstallation+ { whChecksInstallationId = 1234123+ }+ } commitCommentEventFixture :: CommitCommentEvent commitCommentEventFixture = CommitCommentEvent
src/GitHub/Data/Webhooks/Events.hs view
@@ -11,6 +11,12 @@ ( EventHasSender(..) , EventHasRepo(..) --+ , CheckSuiteEventAction(..)+ , CheckSuiteEvent(..)+ --+ , CheckRunEventAction(..)+ , CheckRunEvent(..)+ -- , CommitCommentEvent(..) , CommitCommentEventAction(..) --@@ -103,9 +109,12 @@ ) where import Data.Aeson (FromJSON(..), withObject, withText, (.:), (.:?), (.!=))+import Control.Applicative ((<*>), pure) import Control.DeepSeq (NFData(..)) import Control.DeepSeq.Generics (genericRnf) import Data.Data (Data, Typeable)+import Data.Functor ((<$>))+import Data.Monoid (mempty) import Data.Time (UTCTime) import Data.Text (Text) import Data.Vector (Vector)@@ -124,6 +133,88 @@ repoForEvent :: eventKind -> HookRepository -- | Represents the "action" field in the+-- 'CheckSuiteEvent' payload.+data CheckSuiteEventAction+ -- | Decodes from "completed"+ = CheckSuiteEventActionCompleted+ -- | Decodes from "requested"+ | CheckSuiteEventActionRequested+ -- | Decodes from "rerequested"+ | CheckSuiteEventActionRerequested+ -- | The result of decoding an unknown check suite event action type+ | CheckSuiteEventActionOther !Text+ deriving (Eq, Ord, Show, Generic, Typeable, Data)++instance NFData CheckSuiteEventAction where rnf = genericRnf++instance FromJSON CheckSuiteEventAction where+ parseJSON = withText "Check suite event action" $ \t ->+ case t of+ "completed" -> pure CheckSuiteEventActionCompleted+ "requested" -> pure CheckSuiteEventActionRequested+ "rerequested" -> pure CheckSuiteEventActionRerequested+ _ -> pure (CheckSuiteEventActionOther t)++-- | Triggered when a check suite is completed, requested, or rerequested.+-- See <https://developer.github.com/v3/activity/events/types/#checksuiteevent>.+data CheckSuiteEvent = CheckSuiteEvent+ { evCheckSuiteAction :: !CheckSuiteEventAction+ , evCheckSuiteCheckSuite :: !HookCheckSuite+ , evCheckSuiteRepository :: !HookRepository+ , evCheckSuiteOrganization :: !(Maybe HookOrganization)+ , evCheckSuiteSender :: !HookUser+ , evCheckSuiteInstallation :: !(Maybe HookChecksInstallation)+ }+ deriving (Eq, Show, Typeable, Data, Generic)++instance EventHasSender CheckSuiteEvent where senderOfEvent = evCheckSuiteSender+instance EventHasRepo CheckSuiteEvent where repoForEvent = evCheckSuiteRepository+instance NFData CheckSuiteEvent where rnf = genericRnf++-- | Represents the "action" field in the+-- 'CheckRunEvent' payload.+data CheckRunEventAction+ -- | Decodes from "created"+ = CheckRunEventActionCreated+ -- | Decodes from "completed"+ | CheckRunEventActionCompleted+ -- | Decodes from "rerequested"+ | CheckRunEventActionRerequested+ -- | Decodes from "requested_action"+ | CheckRunEventActionRequestedAction+ -- | The result of decoding an unknown check run event action type+ | CheckRunEventActionOther !Text+ deriving (Eq, Ord, Show, Generic, Typeable, Data)++instance NFData CheckRunEventAction where rnf = genericRnf++instance FromJSON CheckRunEventAction where+ parseJSON = withText "Check suite event action" $ \t ->+ case t of+ "created" -> pure CheckRunEventActionCreated+ "completed" -> pure CheckRunEventActionCompleted+ "requested" -> pure CheckRunEventActionRerequested+ "requested_action" -> pure CheckRunEventActionRequestedAction+ _ -> pure (CheckRunEventActionOther t)++-- | Triggered when a check run is created, rerequested, completed, or has a requested_action.+-- See <https://developer.github.com/v3/activity/events/types/#checkrunevent>.+data CheckRunEvent = CheckRunEvent+ { evCheckRunAction :: !CheckRunEventAction+ , evCheckRunCheckRun :: !HookCheckRun+ , evCheckRunRequestedAction :: !(Maybe HookCheckRunRequestedAction)+ , evCheckRunRepository :: !HookRepository+ , evCheckRunOrganization :: !(Maybe HookOrganization)+ , evCheckRunSender :: !HookUser+ , evCheckRunInstallation :: !(Maybe HookChecksInstallation)+ }+ deriving (Eq, Show, Typeable, Data, Generic)++instance EventHasSender CheckRunEvent where senderOfEvent = evCheckRunSender+instance EventHasRepo CheckRunEvent where repoForEvent = evCheckRunRepository+instance NFData CheckRunEvent where rnf = genericRnf++-- | Represents the "action" field in the -- 'CommitCommentEvent' payload. data CommitCommentEventAction -- | Decodes from "created"@@ -1190,6 +1281,25 @@ -- Aeson Instances++instance FromJSON CheckSuiteEvent where+ parseJSON = withObject "CheckSuiteEvent" $ \o -> CheckSuiteEvent+ <$> o .: "action"+ <*> o .: "check_suite"+ <*> o .: "repository"+ <*> o .:? "organization"+ <*> o .: "sender"+ <*> o .:? "installation"++instance FromJSON CheckRunEvent where+ parseJSON = withObject "CheckRunEvent" $ \o -> CheckRunEvent+ <$> o .: "action"+ <*> o .: "check_run"+ <*> o .:? "requested_action"+ <*> o .: "repository"+ <*> o .:? "organization"+ <*> o .: "sender"+ <*> o .:? "installation" instance FromJSON CommitCommentEvent where parseJSON = withObject "CommitCommentEvent" $ \o -> CommitCommentEvent
src/GitHub/Data/Webhooks/Payload.hs view
@@ -30,6 +30,19 @@ , HookProjectColumn(..) , HookIssueLabels(..) , HookCommit(..)+ , HookCheckSuiteStatus(..)+ , HookCheckSuiteConclusion(..)+ , HookCheckSuite(..)+ , HookCheckSuiteCommit(..)+ , HookCheckRunStatus(..)+ , HookCheckRunConclusion(..)+ , HookCheckRun(..)+ , HookCheckRunOutput(..)+ , HookCheckRunRequestedAction(..)+ , HookChecksInstallation(..)+ , HookChecksPullRequest(..)+ , HookChecksPullRequestRepository(..)+ , HookChecksPullRequestTarget(..) , HookRelease(..) , HookPullRequest(..) , PullRequestTarget(..)@@ -47,8 +60,9 @@ import Data.Aeson (FromJSON(..), withObject, withText, (.!=), (.:), (.:?)) import Control.DeepSeq (NFData (..)) import Control.DeepSeq.Generics (genericRnf)-import Control.Applicative ((<|>))+import Control.Applicative ((<|>), (<*>), pure) import Data.Data (Data, Typeable)+import Data.Functor ((<$>)) import Data.Time (UTCTime) import Data.Time.Clock.POSIX (posixSecondsToUTCTime) import Data.Text (Text)@@ -411,9 +425,247 @@ instance NFData HookIssueLabels where rnf = genericRnf +-- | Represents the "status" field in the+-- 'HookCheckSuite' payload.+data HookCheckSuiteStatus+ -- | Decodes from "requested"+ = HookCheckSuiteStatusRequested+ -- | Decodes from "queued".+ | HookCheckSuiteStatusQueued+ -- | Decodes from "in_progress"+ | HookCheckSuiteStatusInProgress+ -- | Decodes from "completed"+ | HookCheckSuiteStatusCompleted+ -- | The result of decoding an unknown check suite status type+ | HookCheckSuiteStatusOther !Text+ deriving (Eq, Ord, Show, Generic, Typeable, Data) --- FIXME: Missing nested metadata that provides commit description--- FIXME: Missing property "parent" (no examples provided)+instance NFData HookCheckSuiteStatus where rnf = genericRnf++instance FromJSON HookCheckSuiteStatus where+ parseJSON = withText "Hook check suite status" $ \t ->+ case t of+ "requested" -> pure HookCheckSuiteStatusRequested+ "queued" -> pure HookCheckSuiteStatusQueued+ "in_progress" -> pure HookCheckSuiteStatusInProgress+ "completed" -> pure HookCheckSuiteStatusCompleted+ _ -> pure (HookCheckSuiteStatusOther t)++-- | Represents the "conclusion" field in the+-- 'HookCheckSuite' payload.+data HookCheckSuiteConclusion+ -- | Decodes from "success"+ = HookCheckSuiteConclusionSuccess+ -- | Decodes from "failure"+ | HookCheckSuiteConclusionFailure+ -- | Decodes from "neutral"+ | HookCheckSuiteConclusionNeutral+ -- | Decodes from "cancelled"+ | HookCheckSuiteConclusionCancelled+ -- | Decodes from "timed_out"+ | HookCheckSuiteConclusionTimedOut+ -- | Decodes from "action_required"+ | HookCheckSuiteConclusionActionRequired+ -- | Decodes from "stale"+ | HookCheckSuiteConclusionStale+ -- | The result of decoding an unknown check suite conclusion type+ | HookCheckSuiteConclusionOther !Text+ deriving (Eq, Ord, Show, Generic, Typeable, Data)++instance NFData HookCheckSuiteConclusion where rnf = genericRnf++instance FromJSON HookCheckSuiteConclusion where+ parseJSON = withText "Hook check suite status" $ \t ->+ case t of+ "success" -> pure HookCheckSuiteConclusionSuccess+ "failure" -> pure HookCheckSuiteConclusionFailure+ "neutral" -> pure HookCheckSuiteConclusionNeutral+ "cancelled" -> pure HookCheckSuiteConclusionCancelled+ "timed_out" -> pure HookCheckSuiteConclusionTimedOut+ "action_required" -> pure HookCheckSuiteConclusionActionRequired+ "stale" -> pure HookCheckSuiteConclusionStale+ _ -> pure (HookCheckSuiteConclusionOther t)++-- FIXME: Missing nested "app", there are examples, but no documentation.+-- | Represents the "check_suite" field in the+-- 'CheckSuiteEvent' payload.+data HookCheckSuite = HookCheckSuite+ { whCheckSuiteId :: !Int+ , whCheckSuiteHeadBranch :: !(Maybe Text) -- ^ The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array and a null value for head_branch.+ , whCheckSuiteHeadSha :: !Text+ , whCheckSuiteStatus :: !HookCheckSuiteStatus+ , whCheckSuiteConclusion :: !(Maybe HookCheckSuiteConclusion)+ , whCheckSuiteUrl :: !URL+ , whCheckSuiteBeforeSha :: !(Maybe Text)+ , whCheckSuiteAfterSha :: !Text+ , whCheckSuitePullRequests :: !(Vector HookChecksPullRequest)+ , whCheckSuiteCreatedAt :: !UTCTime+ , whCheckSuiteUpdatedAt :: !UTCTime+ , whCheckSuiteLatestCheckRunsCount :: !(Maybe Int) -- not included in the check run nested payload+ , whCheckSuiteCheckRunsUrl :: !(Maybe URL) -- not included in the check run nested payload+ , whCheckSuiteHeadCommit :: !(Maybe HookCheckSuiteCommit) -- not included in the check run nested payload+ }+ deriving (Eq, Show, Typeable, Data, Generic)++instance NFData HookCheckSuite where rnf = genericRnf++-- | Represents the "head_commit" field in the+-- 'CheckSuiteEvent' payload.+data HookCheckSuiteCommit = HookCheckSuiteCommit+ { whCheckSuiteCommitSha :: !Text -- ^ Sometimes called the commit 'id'.+ , whCheckSuiteCommitAuthor :: !HookSimpleUser+ , whCheckSuiteCommitCommitter :: !HookSimpleUser+ }+ deriving (Eq, Show, Typeable, Data, Generic)++instance NFData HookCheckSuiteCommit where rnf = genericRnf++-- | Represents the "status" field in the+-- 'HookCheckRun' payload.+data HookCheckRunStatus+ -- | Decodes from "queued"+ = HookCheckRunStatusQueued+ -- | Decodes from "in_progress"+ | HookCheckRunStatusInProgress+ -- | Decodes from "completed"+ | HookCheckRunStatusCompleted+ -- | The result of decoding an unknown check run status type+ | HookCheckRunStatusOther !Text+ deriving (Eq, Ord, Show, Generic, Typeable, Data)++instance NFData HookCheckRunStatus where rnf = genericRnf++instance FromJSON HookCheckRunStatus where+ parseJSON = withText "Hook check suite status" $ \t ->+ case t of+ "queued" -> pure HookCheckRunStatusQueued+ "in_progress" -> pure HookCheckRunStatusInProgress+ "completed" -> pure HookCheckRunStatusCompleted+ _ -> pure (HookCheckRunStatusOther t)++-- | Represents the "conclusion" field in the+-- 'HookCheckRun' payload.+data HookCheckRunConclusion+ -- | Decodes from "success"+ = HookCheckRunConclusionSuccess+ -- | Decodes from "failure"+ | HookCheckRunConclusionFailure+ -- | Decodes from "neutral"+ | HookCheckRunConclusionNeutral+ -- | Decodes from "cancelled"+ | HookCheckRunConclusionCancelled+ -- | Decodes from "timed_out"+ | HookCheckRunConclusionTimedOut+ -- | Decodes from "action_required"+ | HookCheckRunConclusionActionRequired+ -- | Decodes from "stale"+ | HookCheckRunConclusionStale+ -- | The result of decoding an unknown check run conclusion type+ | HookCheckRunConclusionOther !Text+ deriving (Eq, Ord, Show, Generic, Typeable, Data)++instance NFData HookCheckRunConclusion where rnf = genericRnf++instance FromJSON HookCheckRunConclusion where+ parseJSON = withText "Hook check suite status" $ \t ->+ case t of+ "success" -> pure HookCheckRunConclusionSuccess+ "failure" -> pure HookCheckRunConclusionFailure+ "neutral" -> pure HookCheckRunConclusionNeutral+ "cancelled" -> pure HookCheckRunConclusionCancelled+ "timed_out" -> pure HookCheckRunConclusionTimedOut+ "action_required" -> pure HookCheckRunConclusionActionRequired+ "stale" -> pure HookCheckRunConclusionStale+ _ -> pure (HookCheckRunConclusionOther t)++-- FIXME: Missing nested "app", there are examples, but no documentation.+-- | Represents the "check_run" field in the+-- 'CheckRunEvent' payload.+data HookCheckRun = HookCheckRun+ { whCheckRunId :: !Int+ , whCheckRunHeadSha :: !Text+ , whCheckRunExternalId :: !Text+ , whCheckRunUrl :: !URL+ , whCheckRunHtmlUrl :: !URL+ , whCheckRunDetailsUrl :: !URL+ , whCheckRunStatus :: !HookCheckRunStatus+ , whCheckRunConclusion :: !(Maybe HookCheckRunConclusion)+ , whCheckRunStartedAt :: !UTCTime+ , whCheckRunCompletedAt :: !(Maybe UTCTime)+ , whCheckRunOutput :: !HookCheckRunOutput+ , whCheckRunName :: !Text+ , weCheckRunCheckSuite :: !HookCheckSuite+ , whCheckRunPullRequests :: !(Vector HookChecksPullRequest)+ }+ deriving (Eq, Show, Typeable, Data, Generic)++instance NFData HookCheckRun where rnf = genericRnf++-- | Represents the "output" field in the+-- 'HookCheckRun' payload.+data HookCheckRunOutput = HookCheckRunOutput+ { whCheckRunOutputTitle :: !(Maybe Text)+ , whCheckRunOutputSummary :: !(Maybe Text)+ , whCheckRunOutputText :: !(Maybe Text)+ , whCheckRunOutputAnnotationsCount :: !Int+ , whCheckRunOutputAnnotationsUrl :: !URL+ }+ deriving (Eq, Show, Typeable, Data, Generic)++instance NFData HookCheckRunOutput where rnf = genericRnf++-- | Represents the "requested_action" field in the+-- 'CheckRunEvent' payload.+newtype HookCheckRunRequestedAction = HookCheckRunRequestedAction+ { whCheckRunRequestedActionIdentifier :: Text+ }+ deriving (Eq, Show, Typeable, Data, Generic)++instance NFData HookCheckRunRequestedAction where rnf = genericRnf++-- | Represents the "installation" field in the checks payloads.+newtype HookChecksInstallation = HookChecksInstallation+ { whChecksInstallationId :: Int+ }+ deriving (Eq, Show, Typeable, Data, Generic)++instance NFData HookChecksInstallation where rnf = genericRnf++-- | Represents the "pull_requests" field in the checks payloads.+data HookChecksPullRequest = HookChecksPullRequest+ { whChecksPullRequestUrl :: !URL+ , whChecksPullRequestId :: !Int+ , whChecksPullRequestNumber :: !Int+ , whChecksPullRequestHead :: !HookChecksPullRequestTarget+ , whChecksPullRequestBase :: !HookChecksPullRequestTarget+ }+ deriving (Eq, Show, Typeable, Data, Generic)++instance NFData HookChecksPullRequest where rnf = genericRnf++-- | Represents the "repo" field in the checks pull_request payloads.+data HookChecksPullRequestRepository = HookChecksPullRequestRepository+ { whChecksPullRequestRepositoryId :: !Int+ , whChecksPullRequestRepositoryUrl :: !URL+ , whChecksPullRequestRepositoryName :: !Text+ }+ deriving (Eq, Show, Typeable, Data, Generic)++instance NFData HookChecksPullRequestRepository where rnf = genericRnf++-- | Represents the repo targets in+-- the checks pull requests repository payloads.+data HookChecksPullRequestTarget = HookChecksPullRequestTarget+ { whChecksPullRequestTargetSha :: !Text+ , whChecksPullRequestTargetRef :: !Text -- ex "somebranch"+ , whChecksPullRequestTargetRepo :: !HookChecksPullRequestRepository+ }+ deriving (Eq, Show, Typeable, Data, Generic)++instance NFData HookChecksPullRequestTarget where rnf = genericRnf++--- FIXME: Missing nested metadata that provides commit description+--- FIXME: Missing property "parent" (no examples provided) data HookCommit = HookCommit { whCommitSha :: !Text -- ^ Sometimes called the commit 'id'. , whCommitUrl :: !URL@@ -426,7 +678,6 @@ instance NFData HookCommit where rnf = genericRnf - -- FIXME: Missing property "assets" (no examples provided) data HookRelease = HookRelease { whReleaseUrl :: !URL@@ -723,9 +974,9 @@ <*> o .: "labels_url" <*> o .: "releases_url" -- FIXME: Wrap optional number/stringified UTCTime in a helper function? See PushEvent fixture- <*> ((o .: "created_at") <|> (posixSecondsToUTCTime <$> o .: "created_at"))- <*> ((o .: "updated_at") <|> (posixSecondsToUTCTime <$> o .: "updated_at"))- <*> ((o .: "pushed_at") <|> (posixSecondsToUTCTime <$> o .: "pushed_at"))+ <*> ((o .: "created_at") <|> (posixSecondsToUTCTime . fromInteger <$> o .: "created_at"))+ <*> ((o .: "updated_at") <|> (posixSecondsToUTCTime . fromInteger <$> o .: "updated_at"))+ <*> ((o .: "pushed_at") <|> (posixSecondsToUTCTime . fromInteger <$> o .: "pushed_at")) <*> o .: "git_url" <*> o .: "ssh_url" <*> o .: "clone_url"@@ -891,6 +1142,82 @@ <*> o .: "name" <*> o .: "color" <*> o .:? "default" .!= False++instance FromJSON HookCheckSuite where+ parseJSON = withObject "HookCheckSuite" $ \o -> HookCheckSuite+ <$> o .: "id"+ <*> o .:? "head_branch"+ <*> o .: "head_sha"+ <*> o .: "status"+ <*> o .:? "conclusion"+ <*> o .: "url"+ <*> o .:? "before"+ <*> o .: "after"+ <*> o .: "pull_requests"+ <*> o .: "created_at"+ <*> o .: "updated_at"+ <*> o .:? "latest_check_runs_count"+ <*> o .:? "check_runs_url"+ <*> o .:? "head_commit"++instance FromJSON HookCheckSuiteCommit where+ parseJSON = withObject "HookCheckSuiteCommit" $ \o -> HookCheckSuiteCommit+ <$> o .: "id"+ <*> o .: "author"+ <*> o .: "committer"++instance FromJSON HookCheckRun where+ parseJSON = withObject "HookCheckRun" $ \o -> HookCheckRun+ <$> o .: "id"+ <*> o .: "head_sha"+ <*> o .: "external_id"+ <*> o .: "url"+ <*> o .: "html_url"+ <*> o .: "details_url"+ <*> o .: "status"+ <*> o .:? "conclusion"+ <*> o .: "started_at"+ <*> o .:? "completed_at"+ <*> o .: "output"+ <*> o .: "name"+ <*> o .: "check_suite"+ <*> o .: "pull_requests"++instance FromJSON HookCheckRunOutput where+ parseJSON = withObject "HookCheckRunOutput" $ \o -> HookCheckRunOutput+ <$> o .: "title"+ <*> o .: "summary"+ <*> o .: "text"+ <*> o .: "annotations_count"+ <*> o .: "annotations_url"++instance FromJSON HookCheckRunRequestedAction where+ parseJSON = withObject "HookCheckRunRequestedAction" $ \o -> HookCheckRunRequestedAction+ <$> o .: "identifier"++instance FromJSON HookChecksInstallation where+ parseJSON = withObject "HookChecksInstallation" $ \o -> HookChecksInstallation+ <$> o .: "id"++instance FromJSON HookChecksPullRequest where+ parseJSON = withObject "HookChecksPullRequest" $ \o -> HookChecksPullRequest+ <$> o .: "url"+ <*> o .: "id"+ <*> o .: "number"+ <*> o .: "head"+ <*> o .: "base"++instance FromJSON HookChecksPullRequestTarget where+ parseJSON = withObject "PullRequestTarget" $ \o -> HookChecksPullRequestTarget+ <$> o .: "sha"+ <*> o .: "ref"+ <*> o .: "repo"++instance FromJSON HookChecksPullRequestRepository where+ parseJSON = withObject "HookChecksPullRequestRepository" $ \o -> HookChecksPullRequestRepository+ <$> o .: "id"+ <*> o .: "url"+ <*> o .: "name" instance FromJSON HookCommit where parseJSON = withObject "HookCommit" $ \o -> HookCommit
src/GitHub/Data/Webhooks/Secure.hs view
@@ -12,7 +12,9 @@ import Control.Monad (unless) import Control.Exception (Exception, throwIO) import Data.ByteArray (convert, constEq)+import Data.Data (Typeable) import Data.Monoid ((<>))+import Data.Functor ((<$>)) import Data.ByteString (ByteString) import Data.Text (Text) import qualified Data.ByteString.Base16 as B16@@ -38,6 +40,7 @@ -- | An exception indicating that the given payload is not secure. data PayloadNotSecure = PayloadNotSecure+ deriving (Typeable) instance Exception PayloadNotSecure
+ stack-examples.yaml view
@@ -0,0 +1,9 @@+resolver: lts-11.5+packages:+- .+- examples/scotty+- examples/servant+- examples/servant-simple+extra-deps:+# Needed for servant examples+- servant-github-webhook-0.4.1.0
stack-ghc-7.10.yaml view
@@ -1,8 +1,1 @@ resolver: lts-6.35-extra-deps:-# Needed for servant examples-- servant-github-webhook-0.4.1.0-# Examples-- ./examples/servant-simple-- ./examples/servant-- ./examples/scotty
stack-ghc-7.8.yaml view
@@ -1,8 +1,3 @@ resolver: lts-2.22 extra-deps:-# Needed for servant examples-- servant-github-webhook-0.4.1.0-# Examples-- ./examples/servant-simple-- ./examples/servant-- ./examples/scotty+- cryptonite-0.6
stack-ghc-8.0.yaml view
@@ -1,8 +1,1 @@ resolver: lts-7.24-extra-deps:-# Needed for servant examples-- servant-github-webhook-0.4.1.0-# Examples-- ./examples/servant-simple-- ./examples/servant-- ./examples/scotty
+ stack-nightly.yaml view
@@ -0,0 +1,1 @@+resolver: nightly-2019-10-15 # Overriden by --resolver nightly on CI matrix
stack.yaml view
@@ -1,8 +1,1 @@ resolver: lts-11.5-extra-deps:-# Needed for servant examples-- servant-github-webhook-0.4.1.0-# Examples-- ./examples/servant-simple-- ./examples/servant-- ./examples/scotty