##// END OF EJS Templates
docs: updated api documentation
marcink -
r1841:e36eb8b6 default
parent child Browse files
Show More
@@ -6,7 +6,7 b' pull_request methods'
6 6 close_pull_request
7 7 ------------------
8 8
9 .. py:function:: close_pull_request(apiuser, repoid, pullrequestid, userid=<Optional:<OptionalAttr:apiuser>>)
9 .. py:function:: close_pull_request(apiuser, repoid, pullrequestid, userid=<Optional:<OptionalAttr:apiuser>>, message=<Optional:''>)
10 10
11 11 Close the pull request specified by `pullrequestid`.
12 12
@@ -19,6 +19,9 b' close_pull_request'
19 19 :type pullrequestid: int
20 20 :param userid: Close the pull request as this user.
21 21 :type userid: Optional(str or int)
22 :param message: Optional message to close the Pull Request with. If not
23 specified it will be generated automatically.
24 :type message: Optional(str)
22 25
23 26 Example output:
24 27
@@ -27,6 +30,7 b' close_pull_request'
27 30 "id": <id_given_in_input>,
28 31 "result": {
29 32 "pull_request_id": "<int>",
33 "close_status": "<str:status_lbl>,
30 34 "closed": "<bool>"
31 35 },
32 36 "error": null
@@ -105,10 +109,12 b' create_pull_request'
105 109 :param description: Set the pull request description.
106 110 :type description: Optional(str)
107 111 :param reviewers: Set the new pull request reviewers list.
112 Reviewer defined by review rules will be added automatically to the
113 defined list.
108 114 :type reviewers: Optional(list)
109 115 Accepts username strings or objects of the format:
110 116
111 {'username': 'nick', 'reasons': ['original author']}
117 [{'username': 'nick', 'reasons': ['original author'], 'mandatory': <bool>}]
112 118
113 119
114 120 get_pull_request
@@ -320,7 +326,7 b' merge_pull_request'
320 326 update_pull_request
321 327 -------------------
322 328
323 .. py:function:: update_pull_request(apiuser, repoid, pullrequestid, title=<Optional:''>, description=<Optional:''>, reviewers=<Optional:None>, update_commits=<Optional:None>, close_pull_request=<Optional:None>)
329 .. py:function:: update_pull_request(apiuser, repoid, pullrequestid, title=<Optional:''>, description=<Optional:''>, reviewers=<Optional:None>, update_commits=<Optional:None>)
324 330
325 331 Updates a pull request.
326 332
@@ -336,10 +342,12 b' update_pull_request'
336 342 :type description: Optional(str)
337 343 :param reviewers: Update pull request reviewers list with new value.
338 344 :type reviewers: Optional(list)
345 Accepts username strings or objects of the format:
346
347 [{'username': 'nick', 'reasons': ['original author'], 'mandatory': <bool>}]
348
339 349 :param update_commits: Trigger update of commits for this pull request
340 350 :type: update_commits: Optional(bool)
341 :param close_pull_request: Close this pull request with rejected state
342 :type: close_pull_request: Optional(bool)
343 351
344 352 Example output:
345 353
@@ -527,6 +527,7 b' get_repo_settings'
527 527 "id": 237,
528 528 "result": {
529 529 "extensions_largefiles": true,
530 "extensions_evolve": true,
530 531 "hooks_changegroup_push_logger": true,
531 532 "hooks_changegroup_repo_size": false,
532 533 "hooks_outgoing_pull_logger": true,
@@ -762,6 +763,49 b' lock'
762 763 }
763 764
764 765
766 maintenance
767 -----------
768
769 .. py:function:: maintenance(apiuser, repoid)
770
771 Triggers a maintenance on the given repository.
772
773 This command can only be run using an |authtoken| with admin
774 rights to the specified repository. For more information,
775 see :ref:`config-token-ref`.
776
777 This command takes the following options:
778
779 :param apiuser: This is filled automatically from the |authtoken|.
780 :type apiuser: AuthUser
781 :param repoid: The repository name or repository ID.
782 :type repoid: str or int
783
784 Example output:
785
786 .. code-block:: bash
787
788 id : <id_given_in_input>
789 result : {
790 "msg": "executed maintenance command",
791 "executed_actions": [
792 <action_message>, <action_message2>...
793 ],
794 "repository": "<repository name>"
795 }
796 error : null
797
798 Example error output:
799
800 .. code-block:: bash
801
802 id : <id_given_in_input>
803 result : null
804 error : {
805 "Unable to execute maintenance on `<reponame>`"
806 }
807
808
765 809 pull
766 810 ----
767 811
General Comments 0
You need to be logged in to leave comments. Login now