I am trying to figure out how to close an issue through the Github API.
Specifically I'm trying to do it through pyGitHub and python, but knowing how to close an issue through the GitHub API would be enough to let me figure it out.
Can anyone point me in the right direction? I'm sure it's simple but I can't find it in the documentation
To unlink an issue that you linked using a keyword, you must edit the pull request description to remove the keyword. You can also use closing keywords in a commit message.
To link a commit to a GitHub Issue, put the issue number with the # character in the Comment text box. For example, #111. To close a GitHub issue, put a keyword and put the issue number with the # character in the Comment text box. For example, Close #111.
As of right now, the issues manager has a button named "Close and comment" for commenting and closing at the same time. However, you are actually commenting then closing the issue.
I did not tested this right away but I think it is possible to close an issue by using pyGitHub's edit function, which in turn relies on this entrypoint in GitHub API.
Basically it should suffice to set the state
parameter to "closed"
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With