diff --git a/docs/api/methods/pull-request-methods.rst b/docs/api/methods/pull-request-methods.rst --- a/docs/api/methods/pull-request-methods.rst +++ b/docs/api/methods/pull-request-methods.rst @@ -252,6 +252,7 @@ get_pull_request_comments }, "comment_text": "Example text", "comment_type": null, + "comment_last_version: 0, "pull_request_version": null, "comment_commit_id": None, "comment_pull_request_id": diff --git a/docs/api/methods/repo-methods.rst b/docs/api/methods/repo-methods.rst --- a/docs/api/methods/repo-methods.rst +++ b/docs/api/methods/repo-methods.rst @@ -173,6 +173,37 @@ delete_repo error: null +edit_comment +------------ + +.. py:function:: edit_comment(apiuser, message, comment_id, version, userid=>) + + Edit comment on the pull request or commit, + specified by the `comment_id` and version. Initially version should be 0 + + :param apiuser: This is filled automatically from the |authtoken|. + :type apiuser: AuthUser + :param comment_id: Specify the comment_id for editing + :type comment_id: int + :param version: version of the comment that will be created, starts from 0 + :type version: int + :param message: The text content of the comment. + :type message: str + :param userid: Comment on the pull request as this user + :type userid: Optional(str or int) + + Example output: + + .. code-block:: bash + + id : + result : { + "comment": "", + "version": "", + }, + error : null + + fork_repo --------- @@ -236,6 +267,40 @@ fork_repo error: null +get_comment +----------- + +.. py:function:: get_comment(apiuser, comment_id) + + Get single comment from repository or pull_request + + :param apiuser: This is filled automatically from the |authtoken|. + :type apiuser: AuthUser + :param comment_id: comment id found in the URL of comment + :type comment_id: str or int + + Example error output: + + .. code-block:: bash + + { + "id" : , + "result" : { + "comment_author": , + "comment_created_on": "2017-02-01T14:38:16.309", + "comment_f_path": "file.txt", + "comment_id": 282, + "comment_lineno": "n1", + "comment_resolved_by": null, + "comment_status": [], + "comment_text": "This file needs a header", + "comment_type": "todo", + "comment_last_version: 0 + }, + "error" : null + } + + get_repo -------- @@ -436,7 +501,8 @@ get_repo_comments "comment_resolved_by": null, "comment_status": [], "comment_text": "This file needs a header", - "comment_type": "todo" + "comment_type": "todo", + "comment_last_version: 0 } ], "error" : null