Skip to content
Merged
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
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ on:
jobs:
build:
uses: TokTok/ci-tools/.github/workflows/haskell-ci.yml@master

common:
uses: TokTok/ci-tools/.github/workflows/common-ci.yml@master
6 changes: 3 additions & 3 deletions src/GitHub/Types/Base/Commit.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module GitHub.Types.Base.Commit where

import Data.Aeson (FromJSON (..), ToJSON (..),
object)
import Data.Aeson.Types (Value (..), (.:), (.=))
import Data.Aeson.Types (Value (..), (.:), (.:?), (.=))
import Data.Text (Text)
import Test.QuickCheck.Arbitrary (Arbitrary (..))

Expand All @@ -17,7 +17,7 @@ import GitHub.Types.Base.User

data Commit = Commit
{ commitSha :: Text
, commitUser :: User
, commitUser :: Maybe User
, commitRepo :: Maybe Repository
, commitLabel :: Text
, commitRef :: Text
Expand All @@ -27,7 +27,7 @@ data Commit = Commit
instance FromJSON Commit where
parseJSON (Object x) = Commit
<$> x .: "sha"
<*> x .: "user"
<*> x .:? "user"
<*> x .: "repo"
<*> x .: "label"
<*> x .: "ref"
Expand Down