Show More
@@ -36,7 +36,7 b' close_pull_request' | |||
|
36 | 36 | comment_pull_request |
|
37 | 37 | -------------------- |
|
38 | 38 | |
|
39 | .. py:function:: comment_pull_request(apiuser, repoid, pullrequestid, message=<Optional:None>, status=<Optional:None>, userid=<Optional:<OptionalAttr:apiuser>>) | |
|
39 | .. py:function:: comment_pull_request(apiuser, repoid, pullrequestid, message=<Optional:None>, commit_id=<Optional:None>, status=<Optional:None>, comment_type=<Optional:u'note'>, resolves_comment_id=<Optional:None>, userid=<Optional:<OptionalAttr:apiuser>>) | |
|
40 | 40 | |
|
41 | 41 | Comment on the pull request specified with the `pullrequestid`, |
|
42 | 42 | in the |repo| specified by the `repoid`, and optionally change the |
@@ -48,15 +48,18 b' comment_pull_request' | |||
|
48 | 48 | :type repoid: str or int |
|
49 | 49 | :param pullrequestid: The pull request ID. |
|
50 | 50 | :type pullrequestid: int |
|
51 | :param commit_id: Specify the commit_id for which to set a comment. If | |
|
52 | given commit_id is different than latest in the PR status | |
|
53 | change won't be performed. | |
|
54 | :type commit_id: str | |
|
51 | 55 | :param message: The text content of the comment. |
|
52 | 56 | :type message: str |
|
53 | 57 | :param status: (**Optional**) Set the approval status of the pull |
|
54 | request. Valid options are: | |
|
55 |
|
|
|
56 | * approved | |
|
57 | * rejected | |
|
58 | * under_review | |
|
58 | request. One of: 'not_reviewed', 'approved', 'rejected', | |
|
59 | 'under_review' | |
|
59 | 60 | :type status: str |
|
61 | :param comment_type: Comment type, one of: 'note', 'todo' | |
|
62 | :type comment_type: Optional(str), default: 'note' | |
|
60 | 63 | :param userid: Comment on the pull request as this user |
|
61 | 64 | :type userid: Optional(str or int) |
|
62 | 65 | |
@@ -68,7 +71,9 b' comment_pull_request' | |||
|
68 | 71 | result : |
|
69 | 72 | { |
|
70 | 73 | "pull_request_id": "<Integer>", |
|
71 | "comment_id": "<Integer>" | |
|
74 | "comment_id": "<Integer>", | |
|
75 | "status": {"given": <given_status>, | |
|
76 | "was_changed": <bool status_was_actually_changed> }, | |
|
72 | 77 | } |
|
73 | 78 | error : null |
|
74 | 79 |
@@ -28,7 +28,7 b' add_field_to_repo' | |||
|
28 | 28 | comment_commit |
|
29 | 29 | -------------- |
|
30 | 30 | |
|
31 |
.. py:function:: comment_commit(apiuser, repoid, commit_id, message, userid=<Optional:<OptionalAttr:apiuser> |
|
|
31 | .. py:function:: comment_commit(apiuser, repoid, commit_id, message, status=<Optional:None>, comment_type=<Optional:u'note'>, resolves_comment_id=<Optional:None>, userid=<Optional:<OptionalAttr:apiuser>>) | |
|
32 | 32 | |
|
33 | 33 | Set a commit comment, and optionally change the status of the commit. |
|
34 | 34 | |
@@ -40,15 +40,17 b' comment_commit' | |||
|
40 | 40 | :type commit_id: str |
|
41 | 41 | :param message: The comment text. |
|
42 | 42 | :type message: str |
|
43 | :param status: (**Optional**) status of commit, one of: 'not_reviewed', | |
|
44 | 'approved', 'rejected', 'under_review' | |
|
45 | :type status: str | |
|
46 | :param comment_type: Comment type, one of: 'note', 'todo' | |
|
47 | :type comment_type: Optional(str), default: 'note' | |
|
43 | 48 | :param userid: Set the user name of the comment creator. |
|
44 | 49 | :type userid: Optional(str or int) |
|
45 | :param status: status, one of 'not_reviewed', 'approved', 'rejected', | |
|
46 | 'under_review' | |
|
47 | :type status: str | |
|
48 | 50 | |
|
49 | 51 | Example error output: |
|
50 | 52 | |
|
51 |
.. code-block:: |
|
|
53 | .. code-block:: bash | |
|
52 | 54 | |
|
53 | 55 | { |
|
54 | 56 | "id" : <id_given_in_input>, |
@@ -539,7 +541,7 b' get_repo_settings' | |||
|
539 | 541 | get_repos |
|
540 | 542 | --------- |
|
541 | 543 | |
|
542 | .. py:function:: get_repos(apiuser) | |
|
544 | .. py:function:: get_repos(apiuser, root=<Optional:None>, traverse=<Optional:True>) | |
|
543 | 545 | |
|
544 | 546 | Lists all existing repositories. |
|
545 | 547 | |
@@ -548,6 +550,14 b' get_repos' | |||
|
548 | 550 | |
|
549 | 551 | :param apiuser: This is filled automatically from the |authtoken|. |
|
550 | 552 | :type apiuser: AuthUser |
|
553 | :param root: specify root repository group to fetch repositories. | |
|
554 | filters the returned repositories to be members of given root group. | |
|
555 | :type root: Optional(None) | |
|
556 | :param traverse: traverse given root into subrepositories. With this flag | |
|
557 | set to False, it will only return top-level repositories from `root`. | |
|
558 | if root is empty it will return just top-level repositories. | |
|
559 | :type traverse: Optional(True) | |
|
560 | ||
|
551 | 561 | |
|
552 | 562 | Example output: |
|
553 | 563 |
@@ -3,6 +3,49 b'' | |||
|
3 | 3 | server methods |
|
4 | 4 | ============== |
|
5 | 5 | |
|
6 | cleanup_sessions | |
|
7 | ---------------- | |
|
8 | ||
|
9 | .. py:function:: cleanup_sessions(apiuser, older_then=<Optional:60>) | |
|
10 | ||
|
11 | Triggers a session cleanup action. | |
|
12 | ||
|
13 | If the ``older_then`` option is set, only sessions that hasn't been | |
|
14 | accessed in the given number of days will be removed. | |
|
15 | ||
|
16 | This command can only be run using an |authtoken| with admin rights to | |
|
17 | the specified repository. | |
|
18 | ||
|
19 | This command takes the following options: | |
|
20 | ||
|
21 | :param apiuser: This is filled automatically from the |authtoken|. | |
|
22 | :type apiuser: AuthUser | |
|
23 | :param older_then: Deletes session that hasn't been accessed | |
|
24 | in given number of days. | |
|
25 | :type older_then: Optional(int) | |
|
26 | ||
|
27 | Example output: | |
|
28 | ||
|
29 | .. code-block:: bash | |
|
30 | ||
|
31 | id : <id_given_in_input> | |
|
32 | result: { | |
|
33 | "backend": "<type of backend>", | |
|
34 | "sessions_removed": <number_of_removed_sessions> | |
|
35 | } | |
|
36 | error : null | |
|
37 | ||
|
38 | Example error output: | |
|
39 | ||
|
40 | .. code-block:: bash | |
|
41 | ||
|
42 | id : <id_given_in_input> | |
|
43 | result : null | |
|
44 | error : { | |
|
45 | 'Error occurred during session cleanup' | |
|
46 | } | |
|
47 | ||
|
48 | ||
|
6 | 49 | get_ip |
|
7 | 50 | ------ |
|
8 | 51 |
General Comments 0
You need to be logged in to leave comments.
Login now