diff --git a/doc/examples/Issue.rst b/doc/examples/Issue.rst index ef25e08dca..bb86d4c26a 100644 --- a/doc/examples/Issue.rst +++ b/doc/examples/Issue.rst @@ -9,6 +9,16 @@ Get issue >>> repo = g.get_repo("PyGithub/PyGithub") >>> repo.get_issue(number=874) Issue(title="PyGithub example usage", number=874) + +Create comment on issue +----------------------- + +.. code-block:: python + + >>> repo = g.get_repo("PyGithub/PyGithub") + >>> issue = repo.get_issue(number=874) + >>> issue.create_comment("Test") + IssueComment(user=NamedUser(login="user"), id=36763078) Create issue ------------ @@ -65,4 +75,4 @@ Close all issues >>> repo = g.get_repo("PyGithub/PyGithub") >>> open_issues = repo.get_issues(state='open') >>> for issue in open_issues: - ... issue.edit(state='closed') \ No newline at end of file + ... issue.edit(state='closed')