diff --git a/spec/DecodeEventsSpec.hs b/spec/DecodeEventsSpec.hs index 12bb2a0..35fd2d3 100644 --- a/spec/DecodeEventsSpec.hs +++ b/spec/DecodeEventsSpec.hs @@ -94,7 +94,7 @@ checkSuiteEventFixture = CheckSuiteEvent , whCheckSuiteConclusion = Just HookCheckSuiteConclusionActionRequired , whCheckSuiteUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/check-suites/123451234" , whCheckSuiteBeforeSha = Just "15c99c3e0b9d840d8465be47813cf39686815f2e" - , whCheckSuiteAfterSha = "45deaf5013c757e58e2665849c3fd3add3edfa59" + , whCheckSuiteAfterSha = Just "45deaf5013c757e58e2665849c3fd3add3edfa59" , whCheckSuitePullRequests = V.fromList [ HookChecksPullRequest @@ -315,7 +315,7 @@ checkRunEventFixture = CheckRunEvent , whCheckSuiteConclusion = Nothing , whCheckSuiteUrl = URL "https://api.github.com/repos/baxterthehacker/public-repo/check-suites/123451234" , whCheckSuiteBeforeSha = Just "15c99c3e0b9d840d8465be47813cf39686815f2e" - , whCheckSuiteAfterSha = "45deaf5013c757e58e2665849c3fd3add3edfa59" + , whCheckSuiteAfterSha = Just "45deaf5013c757e58e2665849c3fd3add3edfa59" , whCheckSuitePullRequests = V.fromList [ HookChecksPullRequest diff --git a/src/GitHub/Data/Webhooks/Payload.hs b/src/GitHub/Data/Webhooks/Payload.hs index 4a1a628..baca996 100644 --- a/src/GitHub/Data/Webhooks/Payload.hs +++ b/src/GitHub/Data/Webhooks/Payload.hs @@ -601,7 +601,7 @@ data HookCheckSuite = HookCheckSuite , whCheckSuiteConclusion :: !(Maybe HookCheckSuiteConclusion) , whCheckSuiteUrl :: !URL , whCheckSuiteBeforeSha :: !(Maybe Text) - , whCheckSuiteAfterSha :: !Text + , whCheckSuiteAfterSha :: !(Maybe Text) , whCheckSuitePullRequests :: !(Vector HookChecksPullRequest) , whCheckSuiteCreatedAt :: !UTCTime , whCheckSuiteUpdatedAt :: !UTCTime @@ -1310,7 +1310,7 @@ instance FromJSON HookCheckSuite where <*> o .:? "conclusion" <*> o .: "url" <*> o .:? "before" - <*> o .: "after" + <*> o .:? "after" <*> o .: "pull_requests" <*> o .: "created_at" <*> o .: "updated_at"