Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
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
1 change: 1 addition & 0 deletions 1 cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ tests: True

constraints: github +openssl
constraints: github-samples +openssl
constraints: HsOpenSSL +use-pkg-config
constraints: operational -buildExamples

-- constraints: text >=2
Expand Down
2 changes: 1 addition & 1 deletion 2 github.cabal
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
3 changes: 3 additions & 0 deletions 3 src/GitHub/Data/Options.hs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ instance Binary IssueState
-- | 'GitHub.Data.Issues.Issue' state reason
data IssueStateReason
= StateReasonCompleted
| StateReasonDuplicate
| StateReasonNotPlanned
| StateReasonReopened
deriving
Expand All @@ -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
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.