We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I would like to be able to use the API to close an issue with a reason why like you can in the UI (https://github.blog/changelog/2022-05-19-the-new-github-issues-may-19th-update/ , https://github.blog/changelog/2022-03-10-the-new-github-issues-march-10th-update/ ). I looked at the Issues API documentation and couldn't find reference to these closing reasons (https://docs.github.com/en/rest/issues/issues#update-an-issue) but I contacted support and they stated:
The API now supports closing issues with state reasons. I'd reach out to the docs team to help update this in the API documentation. Here is a sample query you can run: curl -X PATCH -H "Accept: application/vnd.github.v3+json" -H "Authorization: token {TOKEN}" https://api.github.com/repos/{org_name}/{repo_name}/issues/{issue-id} -d '{"state":"closed","state_reason":"not_planned"}' "state_reason" can either be completed or not_planned.
The API now supports closing issues with state reasons. I'd reach out to the docs team to help update this in the API documentation.
Here is a sample query you can run:
curl -X PATCH -H "Accept: application/vnd.github.v3+json" -H "Authorization: token {TOKEN}" https://api.github.com/repos/{org_name}/{repo_name}/issues/{issue-id} -d '{"state":"closed","state_reason":"not_planned"}'
"state_reason" can either be completed or not_planned.
"state_reason"
completed
not_planned
The text was updated successfully, but these errors were encountered:
Wonderful, @parkr - thank you for your due diligence in contacting GitHub tech support!
Would you like to create a PR, or shall I open this issue up to other contributors to this repo to implement?
Sorry, something went wrong.
I would like to tackle the issue myself, but I won't hold it against anyone if they get to it first.
No rush, @parkr, and thank you! The issue is yours.
Add state_reason to IssuesService.Edit (#2395)
404bf94
Fixes: #2393.
parkr
Successfully merging a pull request may close this issue.
I would like to be able to use the API to close an issue with a reason why like you can in the UI (https://github.blog/changelog/2022-05-19-the-new-github-issues-may-19th-update/ , https://github.blog/changelog/2022-03-10-the-new-github-issues-march-10th-update/ ). I looked at the Issues API documentation and couldn't find reference to these closing reasons (https://docs.github.com/en/rest/issues/issues#update-an-issue) but I contacted support and they stated:
The text was updated successfully, but these errors were encountered: