github-api icon indicating copy to clipboard operation
github-api copied to clipboard

GHIssueStateReason should add reopened

Open rnveach opened this issue 10 months ago • 1 comments

https://github.com/hub4j/github-api/blob/e14ec3b3677760714cd096ad8157a3e6a6dded65/src/main/java/org/kohsuke/github/GHIssueStateReason.java

https://docs.github.com/en/rest/issues/issues?apiVersion=2022-11-28#update-an-issue

state_reason string or null Can be one of: completed, not_planned, reopened, null

reopened is supported and should be added.

rnveach avatar Feb 17 '25 20:02 rnveach

Actually there is a re-open method. I am not sure if it makes more sense to have that use reopen (as the reason) instead of adding this to the enum.

https://github.com/hub4j/github-api/blob/e14ec3b3677760714cd096ad8157a3e6a6dded65/src/main/java/org/kohsuke/github/GHIssue.java#L329

I tried looking for closing as a duplicate and it is weird the API doesn't allow it, but it is a feature on GH web UI.

rnveach avatar Feb 17 '25 20:02 rnveach