6

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

ErikMD
  • 13,377
  • 3
  • 35
  • 71
Bar Smith
  • 797
  • 6
  • 20

1 Answers1

5

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".

ErikMD
  • 13,377
  • 3
  • 35
  • 71
  • 1
    This worked like a charm. The exact code was 'prAsIssue.edit(state='closed')'. I am working on putting together some updated documentation examples for pyGitHub and this will certainly be in there. Thank you! – Bar Smith Apr 02 '18 at 21:22