diff --git a/cabal.project b/cabal.project index ed0996f6..be4081d6 100644 --- a/cabal.project +++ b/cabal.project @@ -6,6 +6,7 @@ tests: True constraints: github +openssl constraints: github-samples +openssl +constraints: HsOpenSSL +use-pkg-config constraints: operational -buildExamples -- constraints: text >=2 diff --git a/github.cabal b/github.cabal index 55a825e8..52195d44 100644 --- a/github.cabal +++ b/github.cabal @@ -1,6 +1,6 @@ cabal-version: 2.4 name: github -version: 0.29.1 +version: 0.30 synopsis: Access to the GitHub API, v3. category: Network description: diff --git a/src/GitHub/Data/Options.hs b/src/GitHub/Data/Options.hs index f1ce58da..bf03c617 100644 --- a/src/GitHub/Data/Options.hs +++ b/src/GitHub/Data/Options.hs @@ -122,6 +122,7 @@ instance Binary IssueState -- | 'GitHub.Data.Issues.Issue' state reason data IssueStateReason = StateReasonCompleted + | StateReasonDuplicate | StateReasonNotPlanned | StateReasonReopened deriving @@ -130,12 +131,14 @@ data IssueStateReason instance ToJSON IssueStateReason where toJSON = String . \case StateReasonCompleted -> "completed" + StateReasonDuplicate -> "duplicate" StateReasonNotPlanned -> "not_planned" StateReasonReopened -> "reopened" instance FromJSON IssueStateReason where parseJSON = withText "IssueStateReason" $ \t -> case T.toLower t of "completed" -> pure StateReasonCompleted + "duplicate" -> pure StateReasonDuplicate "not_planned" -> pure StateReasonNotPlanned "reopened" -> pure StateReasonReopened _ -> fail $ "Unknown IssueStateReason: " <> T.unpack t