Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion spec/DecodeEventsSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5801,6 +5801,7 @@ pushEventFixture = PushEvent
, whUserType = OwnerUser
, whUserIsAdminOfSite = False
}
, evPushInstallation = Nothing
}

pushEventFixtureWithoutSender :: PushEvent
Expand Down Expand Up @@ -5923,7 +5924,11 @@ pushEventFixtureWithoutSender =
whOrgDescription = "Plurality Media"
}
),
evPushSender = Nothing
evPushSender = Nothing,
evPushInstallation = Just $ HookChecksInstallation
{ whChecksInstallationId = 17816238
, whChecksInstallationNodeId = "MDIzklOdGunVcFm0WauSW9z5GFdsGb0FW9uaTMgM3zcNjg4="
}
}

releaseEventFixture :: ReleaseEvent
Expand Down
2 changes: 2 additions & 0 deletions src/GitHub/Data/Webhooks/Events.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1119,6 +1119,7 @@ data PushEvent = PushEvent
, evPushOrganization :: !(Maybe HookOrganization)
-- | In very rare cases, the sender may be missing.
, evPushSender :: !(Maybe HookUser)
, evPushInstallation :: !(Maybe HookChecksInstallation)
}
deriving (Eq, Show, Typeable, Data, Generic)

Expand Down Expand Up @@ -1575,6 +1576,7 @@ instance FromJSON PushEvent where
<*> o .: "repository"
<*> o .:? "organization"
<*> o .:? "sender"
<*> o .:? "installation"

instance FromJSON ReleaseEvent where
parseJSON = withObject "ReleaseEvent" $ \o -> ReleaseEvent
Expand Down