github-types 0.1.0.3 → 0.1.0.4
raw patch · 3 files changed
+35/−33 lines, 3 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- GitHub.Types.Events: deploymentEventDescription :: DeploymentEvent -> Maybe Text
- GitHub.Types.Events: deploymentEventEnvironment :: DeploymentEvent -> Text
- GitHub.Types.Events: deploymentEventId :: DeploymentEvent -> Int
- GitHub.Types.Events: deploymentEventName :: DeploymentEvent -> Text
- GitHub.Types.Events: deploymentEventPayload :: DeploymentEvent -> Value
- GitHub.Types.Events: deploymentEventSha :: DeploymentEvent -> Text
- GitHub.Types.Events: deploymentStatusEventDescription :: DeploymentStatusEvent -> Maybe Text
- GitHub.Types.Events: deploymentStatusEventState :: DeploymentStatusEvent -> State
- GitHub.Types.Events: deploymentStatusEventTargetUrl :: DeploymentStatusEvent -> Maybe Text
+ GitHub.Types.Events: deploymentEventDeployment :: DeploymentEvent -> Deployment
+ GitHub.Types.Events: deploymentStatusEventDeploymentStatus :: DeploymentStatusEvent -> DeploymentStatus
+ GitHub.Types.Repository: DeploymentStatus :: Int -> Text -> Maybe Text -> Maybe Text -> Maybe Text -> DeploymentStatus
+ GitHub.Types.Repository: data DeploymentStatus
+ GitHub.Types.Repository: deploymentName :: Deployment -> Text
+ GitHub.Types.Repository: deploymentStatusDeploymentUrl :: DeploymentStatus -> Maybe Text
+ GitHub.Types.Repository: deploymentStatusDescription :: DeploymentStatus -> Maybe Text
+ GitHub.Types.Repository: deploymentStatusId :: DeploymentStatus -> Int
+ GitHub.Types.Repository: deploymentStatusState :: DeploymentStatus -> Text
+ GitHub.Types.Repository: deploymentStatusTargetUrl :: DeploymentStatus -> Maybe Text
+ GitHub.Types.Repository: deploymentTask :: Deployment -> Text
+ GitHub.Types.Repository: instance Eq DeploymentStatus
+ GitHub.Types.Repository: instance FromJSON DeploymentStatus
+ GitHub.Types.Repository: instance Show DeploymentStatus
- GitHub.Types.Events: DeploymentEvent :: Int -> Text -> Text -> Value -> Text -> Maybe Text -> Repository -> DeploymentEvent
+ GitHub.Types.Events: DeploymentEvent :: Deployment -> Repository -> DeploymentEvent
- GitHub.Types.Events: DeploymentStatusEvent :: State -> Maybe Text -> Deployment -> Maybe Text -> Repository -> DeploymentStatusEvent
+ GitHub.Types.Events: DeploymentStatusEvent :: DeploymentStatus -> Deployment -> Repository -> DeploymentStatusEvent
- GitHub.Types.Repository: Deployment :: Int -> Text -> Text -> Text -> Text -> Value -> Deployment
+ GitHub.Types.Repository: Deployment :: Int -> Text -> Text -> Text -> Text -> Text -> Value -> Text -> Deployment
Files
- github-types.cabal +1/−1
- src/GitHub/Types/Events.hs +9/−30
- src/GitHub/Types/Repository.hs +25/−2
github-types.cabal view
@@ -1,5 +1,5 @@ name: github-types-version: 0.1.0.3+version: 0.1.0.4 license: OtherLicense license-file: LICENSE author: Tomas Carnecky
src/GitHub/Types/Events.hs view
@@ -55,30 +55,15 @@ -- DeploymentEvent data DeploymentEvent = DeploymentEvent- { deploymentEventId :: Int- -- ^ The deployment Id (UNDOCUMENTED).- , deploymentEventSha :: Text- -- The commit SHA for which this deployment was created.- , deploymentEventName :: Text- -- ^ Name of repository for this deployment, formatted as :owner/:repo.- , deploymentEventPayload :: Value- -- ^ The optional extra information for this deployment.- , deploymentEventEnvironment :: Text- -- ^ The optional environment to deploy to. Default: "production"- , deploymentEventDescription :: Maybe Text- -- ^ The optional human-readable description added to the deployment.+ { deploymentEventDeployment :: Deployment+ -- ^ The deployment. , deploymentEventRepository :: Repository -- ^ The repository for which the deployment was created (UNDOCUMENTED). } deriving (Eq, Show) instance FromJSON DeploymentEvent where parseJSON (Object x) = DeploymentEvent- <$> x .: "id"- <*> x .: "sha"- <*> x .: "name"- <*> x .: "payload"- <*> x .: "environment"- <*> x .: "description"+ <$> x .: "deployment" <*> x .: "repository" parseJSON _ = mzero@@ -88,24 +73,18 @@ -- DeploymentStatusEvent data DeploymentStatusEvent = DeploymentStatusEvent- { deploymentStatusEventState :: State- -- ^ The new state.- , deploymentStatusEventTargetUrl :: Maybe Text- -- ^ The optional link added to the status.- , deploymentStatusEventDeployment :: Deployment- -- ^ The deployment that this status is associated with.- , deploymentStatusEventDescription :: Maybe Text- -- ^ The optional human-readable description added to the status.- , deploymentStatusEventRepository :: Repository+ { deploymentStatusEventDeploymentStatus :: DeploymentStatus+ -- ^ The deployment status.+ , deploymentStatusEventDeployment :: Deployment+ -- ^ The deployment which the status affects.+ , deploymentStatusEventRepository :: Repository -- ^ The repository for which the deployment was created (UNDOCUMENTED). } deriving (Eq, Show) instance FromJSON DeploymentStatusEvent where parseJSON (Object x) = DeploymentStatusEvent- <$> x .: "state"- <*> x .: "target_url"+ <$> x .: "deployment_status" <*> x .: "deployment"- <*> x .: "description" <*> x .: "repository" parseJSON _ = mzero
src/GitHub/Types/Repository.hs view
@@ -33,9 +33,11 @@ { deploymentId :: Int , deploymentSha :: Text , deploymentRef :: Text+ , deploymentTask :: Text+ , deploymentName :: Text , deploymentEnvironment :: Text- , deploymentDescription :: Text , deploymentPayload :: Value+ , deploymentDescription :: Text } deriving (Eq, Show) instance FromJSON Deployment where@@ -43,8 +45,29 @@ <$> x .: "id" <*> x .: "sha" <*> x .: "ref"+ <*> x .: "task"+ <*> x .: "name" <*> x .: "environment"- <*> x .: "description" <*> x .: "payload"+ <*> x .: "description"++ parseJSON _ = mzero+++data DeploymentStatus = DeploymentStatus+ { deploymentStatusId :: Int+ , deploymentStatusState :: Text+ , deploymentStatusTargetUrl :: Maybe Text+ , deploymentStatusDescription :: Maybe Text+ , deploymentStatusDeploymentUrl :: Maybe Text+ } deriving (Eq, Show)++instance FromJSON DeploymentStatus where+ parseJSON (Object x) = DeploymentStatus+ <$> x .: "id"+ <*> x .: "state"+ <*> x .: "target_url"+ <*> x .: "description"+ <*> x .: "deployment_url" parseJSON _ = mzero