Skip to content

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions