Show More
@@ -25,8 +25,7 b' close_pull_request' | |||||
25 | .. code-block:: bash |
|
25 | .. code-block:: bash | |
26 |
|
26 | |||
27 | "id": <id_given_in_input>, |
|
27 | "id": <id_given_in_input>, | |
28 | "result": |
|
28 | "result": { | |
29 | { |
|
|||
30 | "pull_request_id": "<int>", |
|
29 | "pull_request_id": "<int>", | |
31 | "closed": "<bool>" |
|
30 | "closed": "<bool>" | |
32 | }, |
|
31 | }, | |
@@ -68,13 +67,12 b' comment_pull_request' | |||||
68 | .. code-block:: bash |
|
67 | .. code-block:: bash | |
69 |
|
68 | |||
70 | id : <id_given_in_input> |
|
69 | id : <id_given_in_input> | |
71 | result : |
|
70 | result : { | |
72 | { |
|
|||
73 | "pull_request_id": "<Integer>", |
|
71 | "pull_request_id": "<Integer>", | |
74 | "comment_id": "<Integer>", |
|
72 | "comment_id": "<Integer>", | |
75 | "status": {"given": <given_status>, |
|
73 | "status": {"given": <given_status>, | |
76 | "was_changed": <bool status_was_actually_changed> }, |
|
74 | "was_changed": <bool status_was_actually_changed> }, | |
77 | } |
|
75 | }, | |
78 | error : null |
|
76 | error : null | |
79 |
|
77 | |||
80 |
|
78 | |||
@@ -109,9 +107,8 b' create_pull_request' | |||||
109 | :param reviewers: Set the new pull request reviewers list. |
|
107 | :param reviewers: Set the new pull request reviewers list. | |
110 | :type reviewers: Optional(list) |
|
108 | :type reviewers: Optional(list) | |
111 | Accepts username strings or objects of the format: |
|
109 | Accepts username strings or objects of the format: | |
112 | { |
|
110 | ||
113 | 'username': 'nick', 'reasons': ['original author'] |
|
111 | {'username': 'nick', 'reasons': ['original author']} | |
114 | } |
|
|||
115 |
|
112 | |||
116 |
|
113 | |||
117 | get_pull_request |
|
114 | get_pull_request | |
@@ -306,8 +303,7 b' merge_pull_request' | |||||
306 | .. code-block:: bash |
|
303 | .. code-block:: bash | |
307 |
|
304 | |||
308 | "id": <id_given_in_input>, |
|
305 | "id": <id_given_in_input>, | |
309 | "result": |
|
306 | "result": { | |
310 | { |
|
|||
311 | "executed": "<bool>", |
|
307 | "executed": "<bool>", | |
312 | "failure_reason": "<int>", |
|
308 | "failure_reason": "<int>", | |
313 | "merge_commit_id": "<merge_commit_id>", |
|
309 | "merge_commit_id": "<merge_commit_id>", | |
@@ -350,8 +346,7 b' update_pull_request' | |||||
350 | .. code-block:: bash |
|
346 | .. code-block:: bash | |
351 |
|
347 | |||
352 | id : <id_given_in_input> |
|
348 | id : <id_given_in_input> | |
353 | result : |
|
349 | result : { | |
354 | { |
|
|||
355 | "msg": "Updated pull request `63`", |
|
350 | "msg": "Updated pull request `63`", | |
356 | "pull_request": <pull_request_object>, |
|
351 | "pull_request": <pull_request_object>, | |
357 | "updated_reviewers": { |
|
352 | "updated_reviewers": { |
@@ -85,6 +85,58 b' get_ip' | |||||
85 | } |
|
85 | } | |
86 |
|
86 | |||
87 |
|
87 | |||
|
88 | get_method | |||
|
89 | ---------- | |||
|
90 | ||||
|
91 | .. py:function:: get_method(apiuser, pattern=<Optional:'*'>) | |||
|
92 | ||||
|
93 | Returns list of all available API methods. By default match pattern | |||
|
94 | os "*" but any other pattern can be specified. eg *comment* will return | |||
|
95 | all methods with comment inside them. If just single method is matched | |||
|
96 | returned data will also include method specification | |||
|
97 | ||||
|
98 | This command can only be run using an |authtoken| with admin rights to | |||
|
99 | the specified repository. | |||
|
100 | ||||
|
101 | This command takes the following options: | |||
|
102 | ||||
|
103 | :param apiuser: This is filled automatically from the |authtoken|. | |||
|
104 | :type apiuser: AuthUser | |||
|
105 | :param pattern: pattern to match method names against | |||
|
106 | :type older_then: Optional("*") | |||
|
107 | ||||
|
108 | Example output: | |||
|
109 | ||||
|
110 | .. code-block:: bash | |||
|
111 | ||||
|
112 | id : <id_given_in_input> | |||
|
113 | "result": [ | |||
|
114 | "changeset_comment", | |||
|
115 | "comment_pull_request", | |||
|
116 | "comment_commit" | |||
|
117 | ] | |||
|
118 | error : null | |||
|
119 | ||||
|
120 | .. code-block:: bash | |||
|
121 | ||||
|
122 | id : <id_given_in_input> | |||
|
123 | "result": [ | |||
|
124 | "comment_commit", | |||
|
125 | { | |||
|
126 | "apiuser": "<RequiredType>", | |||
|
127 | "comment_type": "<Optional:u'note'>", | |||
|
128 | "commit_id": "<RequiredType>", | |||
|
129 | "message": "<RequiredType>", | |||
|
130 | "repoid": "<RequiredType>", | |||
|
131 | "request": "<RequiredType>", | |||
|
132 | "resolves_comment_id": "<Optional:None>", | |||
|
133 | "status": "<Optional:None>", | |||
|
134 | "userid": "<Optional:<OptionalAttr:apiuser>>" | |||
|
135 | } | |||
|
136 | ] | |||
|
137 | error : null | |||
|
138 | ||||
|
139 | ||||
88 | get_server_info |
|
140 | get_server_info | |
89 | --------------- |
|
141 | --------------- | |
90 |
|
142 |
@@ -41,6 +41,7 b' create_user' | |||||
41 | :type force_password_change: Optional(``True`` | ``False``) |
|
41 | :type force_password_change: Optional(``True`` | ``False``) | |
42 | :param create_personal_repo_group: Create personal repo group for this user |
|
42 | :param create_personal_repo_group: Create personal repo group for this user | |
43 | :type create_personal_repo_group: Optional(``True`` | ``False``) |
|
43 | :type create_personal_repo_group: Optional(``True`` | ``False``) | |
|
44 | ||||
44 | Example output: |
|
45 | Example output: | |
45 |
|
46 | |||
46 | .. code-block:: bash |
|
47 | .. code-block:: bash | |
@@ -145,8 +146,8 b' get_user' | |||||
145 | "result": { |
|
146 | "result": { | |
146 | "active": true, |
|
147 | "active": true, | |
147 | "admin": false, |
|
148 | "admin": false, | |
148 | "api_key": "api-key", |
|
|||
149 | "api_keys": [ list of keys ], |
|
149 | "api_keys": [ list of keys ], | |
|
150 | "auth_tokens": [ list of tokens with details ], | |||
150 | "email": "user@example.com", |
|
151 | "email": "user@example.com", | |
151 | "emails": [ |
|
152 | "emails": [ | |
152 | "user@example.com" |
|
153 | "user@example.com" | |
@@ -157,6 +158,7 b' get_user' | |||||
157 | "ip_addresses": [], |
|
158 | "ip_addresses": [], | |
158 | "language": null, |
|
159 | "language": null, | |
159 | "last_login": "Timestamp", |
|
160 | "last_login": "Timestamp", | |
|
161 | "last_activity": "Timestamp", | |||
160 | "lastname": "surnae", |
|
162 | "lastname": "surnae", | |
161 | "permissions": { |
|
163 | "permissions": { | |
162 | "global": [ |
|
164 | "global": [ | |
@@ -183,6 +185,32 b' get_user' | |||||
183 | } |
|
185 | } | |
184 |
|
186 | |||
185 |
|
187 | |||
|
188 | get_user_audit_logs | |||
|
189 | ------------------- | |||
|
190 | ||||
|
191 | .. py:function:: get_user_audit_logs(apiuser, userid=<Optional:<OptionalAttr:apiuser>>) | |||
|
192 | ||||
|
193 | Fetches all action logs made by the specified user. | |||
|
194 | ||||
|
195 | This command takes the following options: | |||
|
196 | ||||
|
197 | :param apiuser: This is filled automatically from the |authtoken|. | |||
|
198 | :type apiuser: AuthUser | |||
|
199 | :param userid: Sets the userid whose list of locked |repos| will be | |||
|
200 | displayed. | |||
|
201 | :type userid: Optional(str or int) | |||
|
202 | ||||
|
203 | Example output: | |||
|
204 | ||||
|
205 | .. code-block:: bash | |||
|
206 | ||||
|
207 | id : <id_given_in_input> | |||
|
208 | result : { | |||
|
209 | [action, action,...] | |||
|
210 | } | |||
|
211 | error : null | |||
|
212 | ||||
|
213 | ||||
186 | get_user_locks |
|
214 | get_user_locks | |
187 | -------------- |
|
215 | -------------- | |
188 |
|
216 |
@@ -245,8 +245,7 b' def merge_pull_request(request, apiuser,' | |||||
245 | .. code-block:: bash |
|
245 | .. code-block:: bash | |
246 |
|
246 | |||
247 | "id": <id_given_in_input>, |
|
247 | "id": <id_given_in_input>, | |
248 | "result": |
|
248 | "result": { | |
249 | { |
|
|||
250 | "executed": "<bool>", |
|
249 | "executed": "<bool>", | |
251 | "failure_reason": "<int>", |
|
250 | "failure_reason": "<int>", | |
252 | "merge_commit_id": "<merge_commit_id>", |
|
251 | "merge_commit_id": "<merge_commit_id>", | |
@@ -258,7 +257,6 b' def merge_pull_request(request, apiuser,' | |||||
258 | } |
|
257 | } | |
259 | }, |
|
258 | }, | |
260 | "error": null |
|
259 | "error": null | |
261 |
|
||||
262 | """ |
|
260 | """ | |
263 | repo = get_repo_or_error(repoid) |
|
261 | repo = get_repo_or_error(repoid) | |
264 | if not isinstance(userid, Optional): |
|
262 | if not isinstance(userid, Optional): | |
@@ -322,8 +320,7 b' def close_pull_request(request, apiuser,' | |||||
322 | .. code-block:: bash |
|
320 | .. code-block:: bash | |
323 |
|
321 | |||
324 | "id": <id_given_in_input>, |
|
322 | "id": <id_given_in_input>, | |
325 | "result": |
|
323 | "result": { | |
326 | { |
|
|||
327 | "pull_request_id": "<int>", |
|
324 | "pull_request_id": "<int>", | |
328 | "closed": "<bool>" |
|
325 | "closed": "<bool>" | |
329 | }, |
|
326 | }, | |
@@ -397,13 +394,12 b' def comment_pull_request(' | |||||
397 | .. code-block:: bash |
|
394 | .. code-block:: bash | |
398 |
|
395 | |||
399 | id : <id_given_in_input> |
|
396 | id : <id_given_in_input> | |
400 | result : |
|
397 | result : { | |
401 | { |
|
|||
402 | "pull_request_id": "<Integer>", |
|
398 | "pull_request_id": "<Integer>", | |
403 | "comment_id": "<Integer>", |
|
399 | "comment_id": "<Integer>", | |
404 | "status": {"given": <given_status>, |
|
400 | "status": {"given": <given_status>, | |
405 | "was_changed": <bool status_was_actually_changed> }, |
|
401 | "was_changed": <bool status_was_actually_changed> }, | |
406 | } |
|
402 | }, | |
407 | error : null |
|
403 | error : null | |
408 | """ |
|
404 | """ | |
409 | repo = get_repo_or_error(repoid) |
|
405 | repo = get_repo_or_error(repoid) | |
@@ -535,9 +531,8 b' def create_pull_request(' | |||||
535 | :param reviewers: Set the new pull request reviewers list. |
|
531 | :param reviewers: Set the new pull request reviewers list. | |
536 | :type reviewers: Optional(list) |
|
532 | :type reviewers: Optional(list) | |
537 | Accepts username strings or objects of the format: |
|
533 | Accepts username strings or objects of the format: | |
538 | { |
|
534 | ||
539 | 'username': 'nick', 'reasons': ['original author'] |
|
535 | {'username': 'nick', 'reasons': ['original author']} | |
540 | } |
|
|||
541 | """ |
|
536 | """ | |
542 |
|
537 | |||
543 | source = get_repo_or_error(source_repo) |
|
538 | source = get_repo_or_error(source_repo) | |
@@ -634,8 +629,7 b' def update_pull_request(' | |||||
634 | .. code-block:: bash |
|
629 | .. code-block:: bash | |
635 |
|
630 | |||
636 | id : <id_given_in_input> |
|
631 | id : <id_given_in_input> | |
637 | result : |
|
632 | result : { | |
638 | { |
|
|||
639 | "msg": "Updated pull request `63`", |
|
633 | "msg": "Updated pull request `63`", | |
640 | "pull_request": <pull_request_object>, |
|
634 | "pull_request": <pull_request_object>, | |
641 | "updated_reviewers": { |
|
635 | "updated_reviewers": { |
@@ -191,6 +191,7 b' def create_user(request, apiuser, userna' | |||||
191 | :type force_password_change: Optional(``True`` | ``False``) |
|
191 | :type force_password_change: Optional(``True`` | ``False``) | |
192 | :param create_personal_repo_group: Create personal repo group for this user |
|
192 | :param create_personal_repo_group: Create personal repo group for this user | |
193 | :type create_personal_repo_group: Optional(``True`` | ``False``) |
|
193 | :type create_personal_repo_group: Optional(``True`` | ``False``) | |
|
194 | ||||
194 | Example output: |
|
195 | Example output: | |
195 |
|
196 | |||
196 | .. code-block:: bash |
|
197 | .. code-block:: bash |
General Comments 0
You need to be logged in to leave comments.
Login now