Skip to content

For issues, get field state_reason to distinguish issues closed as not_planned #495

Closed
@andreasabel

Description

@andreasabel

For issues, get field state_reason to distinguish issues closed as not_planned.
This amounts to a new enum type IssueStateReason and a new field in Issue which should be parsed here:

instance FromJSON Issue where
parseJSON = withObject "Issue" $ \o -> Issue
<$> o .:? "closed_at"
<*> o .: "updated_at"
<*> o .: "events_url"
<*> o .: "html_url"
<*> o .:? "closed_by"
<*> o .: "labels"
<*> o .: "number"
<*> o .: "assignees"
<*> o .: "user"
<*> o .: "title"
<*> o .:? "pull_request"
<*> o .: "url"
<*> o .: "created_at"
<*> o .: "body"
<*> o .: "state"
<*> o .: "id"
<*> o .: "comments"
<*> o .:? "milestone"

According to https://docs.github.com/en/rest/issues/issues?apiVersion=2022-11-28#get-an-issue the possible values are

  • completed
  • not_planned
  • reopened
  • null

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions