##// 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 close_pull_request
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 Close the pull request specified by `pullrequestid`.
11 Close the pull request specified by `pullrequestid`.
12
12
@@ -19,6 +19,9 b' close_pull_request'
19 :type pullrequestid: int
19 :type pullrequestid: int
20 :param userid: Close the pull request as this user.
20 :param userid: Close the pull request as this user.
21 :type userid: Optional(str or int)
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 Example output:
26 Example output:
24
27
@@ -27,6 +30,7 b' close_pull_request'
27 "id": <id_given_in_input>,
30 "id": <id_given_in_input>,
28 "result": {
31 "result": {
29 "pull_request_id": "<int>",
32 "pull_request_id": "<int>",
33 "close_status": "<str:status_lbl>,
30 "closed": "<bool>"
34 "closed": "<bool>"
31 },
35 },
32 "error": null
36 "error": null
@@ -105,10 +109,12 b' create_pull_request'
105 :param description: Set the pull request description.
109 :param description: Set the pull request description.
106 :type description: Optional(str)
110 :type description: Optional(str)
107 :param reviewers: Set the new pull request reviewers list.
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 :type reviewers: Optional(list)
114 :type reviewers: Optional(list)
109 Accepts username strings or objects of the format:
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 get_pull_request
120 get_pull_request
@@ -320,7 +326,7 b' merge_pull_request'
320 update_pull_request
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 Updates a pull request.
331 Updates a pull request.
326
332
@@ -336,10 +342,12 b' update_pull_request'
336 :type description: Optional(str)
342 :type description: Optional(str)
337 :param reviewers: Update pull request reviewers list with new value.
343 :param reviewers: Update pull request reviewers list with new value.
338 :type reviewers: Optional(list)
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 :param update_commits: Trigger update of commits for this pull request
349 :param update_commits: Trigger update of commits for this pull request
340 :type: update_commits: Optional(bool)
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 Example output:
352 Example output:
345
353
@@ -527,6 +527,7 b' get_repo_settings'
527 "id": 237,
527 "id": 237,
528 "result": {
528 "result": {
529 "extensions_largefiles": true,
529 "extensions_largefiles": true,
530 "extensions_evolve": true,
530 "hooks_changegroup_push_logger": true,
531 "hooks_changegroup_push_logger": true,
531 "hooks_changegroup_repo_size": false,
532 "hooks_changegroup_repo_size": false,
532 "hooks_outgoing_pull_logger": true,
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 pull
809 pull
766 ----
810 ----
767
811
General Comments 0
You need to be logged in to leave comments. Login now