diff --git a/docs/api/api.rst b/docs/api/api.rst --- a/docs/api/api.rst +++ b/docs/api/api.rst @@ -1140,6 +1140,95 @@ Example output:: } } +get_pullrequest +^^^^^^^^^^^^^^^ + +Get information and review status for a given pull request. This command can only be executed +using the api_key of a user with read permissions to the original repository. + +INPUT:: + + id : + api_key : "" + method : "get_pullrequest" + args: { + "pullrequest_id" : "", + } + +OUTPUT:: + + id : + result: { + "status": "", + "pull_request_id": , + "description": "", + "title": "", + "url": "", + "reviewers": [ + { + "username": "", + }, + ... + ], + "org_repo_url": "", + "org_ref_parts": [ + "", + "", + "" + ], + "other_ref_parts": [ + "", + "", + "" + ], + "comments": [ + { + "username": "", + "text": "", + "comment_id": "", + }, + ... + ], + "owner": "", + "statuses": [ + { + "status": "", # "under_review", "approved" or "rejected" + "reviewer": "", + "modified_at": "" # iso 8601 date, server's timezone + }, + ... + ], + "revisions": [ + "", + ... + ] + }, + error: null + +comment_pullrequest +^^^^^^^^^^^^^^^^^^^ + +Add comment, change status or close a given pull request. This command can only be executed +using the api_key of a user with read permissions to the original repository. + +INPUT:: + + id : + api_key : "" + method : "comment_pullrequest" + args: { + "pull_request_id": "", + "comment_msg": Optional(''), + "status": Optional(None), # "under_review", "approved" or "rejected" + "close_pr": Optional(False)", + } + +OUTPUT:: + + id : + result: True + error: null + API access for web views ------------------------