Skip to content

Commit 953b751

Browse files
committed
Bump to 0.30, fix #520
1 parent dc43816 commit 953b751

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

github.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cabal-version: 2.4
22
name: github
3-
version: 0.29.1
3+
version: 0.30
44
synopsis: Access to the GitHub API, v3.
55
category: Network
66
description:

src/GitHub/Data/Options.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ instance Binary IssueState
122122
-- | 'GitHub.Data.Issues.Issue' state reason
123123
data IssueStateReason
124124
= StateReasonCompleted
125+
| StateReasonDuplicate
125126
| StateReasonNotPlanned
126127
| StateReasonReopened
127128
deriving
@@ -130,12 +131,14 @@ data IssueStateReason
130131
instance ToJSON IssueStateReason where
131132
toJSON = String . \case
132133
StateReasonCompleted -> "completed"
134+
StateReasonDuplicate -> "duplicate"
133135
StateReasonNotPlanned -> "not_planned"
134136
StateReasonReopened -> "reopened"
135137

136138
instance FromJSON IssueStateReason where
137139
parseJSON = withText "IssueStateReason" $ \t -> case T.toLower t of
138140
"completed" -> pure StateReasonCompleted
141+
"duplicate" -> pure StateReasonDuplicate
139142
"not_planned" -> pure StateReasonNotPlanned
140143
"reopened" -> pure StateReasonReopened
141144
_ -> fail $ "Unknown IssueStateReason: " <> T.unpack t

0 commit comments

Comments
 (0)