##// END OF EJS Templates
docs: updated API docs
marcink -
r4523:53d2eca7 stable
parent child Browse files
Show More
@@ -1,448 +1,465 b''
1 .. _pull-request-methods-ref:
1 .. _pull-request-methods-ref:
2
2
3 pull_request methods
3 pull_request methods
4 ====================
4 ====================
5
5
6 close_pull_request
6 close_pull_request
7 ------------------
7 ------------------
8
8
9 .. py:function:: close_pull_request(apiuser, pullrequestid, repoid=<Optional:None>, userid=<Optional:<OptionalAttr:apiuser>>, message=<Optional:''>)
9 .. py:function:: close_pull_request(apiuser, pullrequestid, repoid=<Optional:None>, 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
13 :param apiuser: This is filled automatically from the |authtoken|.
13 :param apiuser: This is filled automatically from the |authtoken|.
14 :type apiuser: AuthUser
14 :type apiuser: AuthUser
15 :param repoid: Repository name or repository ID to which the pull
15 :param repoid: Repository name or repository ID to which the pull
16 request belongs.
16 request belongs.
17 :type repoid: str or int
17 :type repoid: str or int
18 :param pullrequestid: ID of the pull request to be closed.
18 :param pullrequestid: ID of the pull request to be closed.
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
22 :param message: Optional message to close the Pull Request with. If not
23 specified it will be generated automatically.
23 specified it will be generated automatically.
24 :type message: Optional(str)
24 :type message: Optional(str)
25
25
26 Example output:
26 Example output:
27
27
28 .. code-block:: bash
28 .. code-block:: bash
29
29
30 "id": <id_given_in_input>,
30 "id": <id_given_in_input>,
31 "result": {
31 "result": {
32 "pull_request_id": "<int>",
32 "pull_request_id": "<int>",
33 "close_status": "<str:status_lbl>,
33 "close_status": "<str:status_lbl>,
34 "closed": "<bool>"
34 "closed": "<bool>"
35 },
35 },
36 "error": null
36 "error": null
37
37
38
38
39 comment_pull_request
39 comment_pull_request
40 --------------------
40 --------------------
41
41
42 .. py:function:: comment_pull_request(apiuser, pullrequestid, repoid=<Optional:None>, message=<Optional:None>, commit_id=<Optional:None>, status=<Optional:None>, comment_type=<Optional:u'note'>, resolves_comment_id=<Optional:None>, extra_recipients=<Optional:[]>, userid=<Optional:<OptionalAttr:apiuser>>, send_email=<Optional:True>)
42 .. py:function:: comment_pull_request(apiuser, pullrequestid, repoid=<Optional:None>, message=<Optional:None>, commit_id=<Optional:None>, status=<Optional:None>, comment_type=<Optional:u'note'>, resolves_comment_id=<Optional:None>, extra_recipients=<Optional:[]>, userid=<Optional:<OptionalAttr:apiuser>>, send_email=<Optional:True>)
43
43
44 Comment on the pull request specified with the `pullrequestid`,
44 Comment on the pull request specified with the `pullrequestid`,
45 in the |repo| specified by the `repoid`, and optionally change the
45 in the |repo| specified by the `repoid`, and optionally change the
46 review status.
46 review status.
47
47
48 :param apiuser: This is filled automatically from the |authtoken|.
48 :param apiuser: This is filled automatically from the |authtoken|.
49 :type apiuser: AuthUser
49 :type apiuser: AuthUser
50 :param repoid: Optional repository name or repository ID.
50 :param repoid: Optional repository name or repository ID.
51 :type repoid: str or int
51 :type repoid: str or int
52 :param pullrequestid: The pull request ID.
52 :param pullrequestid: The pull request ID.
53 :type pullrequestid: int
53 :type pullrequestid: int
54 :param commit_id: Specify the commit_id for which to set a comment. If
54 :param commit_id: Specify the commit_id for which to set a comment. If
55 given commit_id is different than latest in the PR status
55 given commit_id is different than latest in the PR status
56 change won't be performed.
56 change won't be performed.
57 :type commit_id: str
57 :type commit_id: str
58 :param message: The text content of the comment.
58 :param message: The text content of the comment.
59 :type message: str
59 :type message: str
60 :param status: (**Optional**) Set the approval status of the pull
60 :param status: (**Optional**) Set the approval status of the pull
61 request. One of: 'not_reviewed', 'approved', 'rejected',
61 request. One of: 'not_reviewed', 'approved', 'rejected',
62 'under_review'
62 'under_review'
63 :type status: str
63 :type status: str
64 :param comment_type: Comment type, one of: 'note', 'todo'
64 :param comment_type: Comment type, one of: 'note', 'todo'
65 :type comment_type: Optional(str), default: 'note'
65 :type comment_type: Optional(str), default: 'note'
66 :param resolves_comment_id: id of comment which this one will resolve
66 :param resolves_comment_id: id of comment which this one will resolve
67 :type resolves_comment_id: Optional(int)
67 :type resolves_comment_id: Optional(int)
68 :param extra_recipients: list of user ids or usernames to add
68 :param extra_recipients: list of user ids or usernames to add
69 notifications for this comment. Acts like a CC for notification
69 notifications for this comment. Acts like a CC for notification
70 :type extra_recipients: Optional(list)
70 :type extra_recipients: Optional(list)
71 :param userid: Comment on the pull request as this user
71 :param userid: Comment on the pull request as this user
72 :type userid: Optional(str or int)
72 :type userid: Optional(str or int)
73 :param send_email: Define if this comment should also send email notification
73 :param send_email: Define if this comment should also send email notification
74 :type send_email: Optional(bool)
74 :type send_email: Optional(bool)
75
75
76 Example output:
76 Example output:
77
77
78 .. code-block:: bash
78 .. code-block:: bash
79
79
80 id : <id_given_in_input>
80 id : <id_given_in_input>
81 result : {
81 result : {
82 "pull_request_id": "<Integer>",
82 "pull_request_id": "<Integer>",
83 "comment_id": "<Integer>",
83 "comment_id": "<Integer>",
84 "status": {"given": <given_status>,
84 "status": {"given": <given_status>,
85 "was_changed": <bool status_was_actually_changed> },
85 "was_changed": <bool status_was_actually_changed> },
86 },
86 },
87 error : null
87 error : null
88
88
89
89
90 create_pull_request
90 create_pull_request
91 -------------------
91 -------------------
92
92
93 .. py:function:: create_pull_request(apiuser, source_repo, target_repo, source_ref, target_ref, owner=<Optional:<OptionalAttr:apiuser>>, title=<Optional:''>, description=<Optional:''>, description_renderer=<Optional:''>, reviewers=<Optional:None>)
93 .. py:function:: create_pull_request(apiuser, source_repo, target_repo, source_ref, target_ref, owner=<Optional:<OptionalAttr:apiuser>>, title=<Optional:''>, description=<Optional:''>, description_renderer=<Optional:''>, reviewers=<Optional:None>, observers=<Optional:None>)
94
94
95 Creates a new pull request.
95 Creates a new pull request.
96
96
97 Accepts refs in the following formats:
97 Accepts refs in the following formats:
98
98
99 * branch:<branch_name>:<sha>
99 * branch:<branch_name>:<sha>
100 * branch:<branch_name>
100 * branch:<branch_name>
101 * bookmark:<bookmark_name>:<sha> (Mercurial only)
101 * bookmark:<bookmark_name>:<sha> (Mercurial only)
102 * bookmark:<bookmark_name> (Mercurial only)
102 * bookmark:<bookmark_name> (Mercurial only)
103
103
104 :param apiuser: This is filled automatically from the |authtoken|.
104 :param apiuser: This is filled automatically from the |authtoken|.
105 :type apiuser: AuthUser
105 :type apiuser: AuthUser
106 :param source_repo: Set the source repository name.
106 :param source_repo: Set the source repository name.
107 :type source_repo: str
107 :type source_repo: str
108 :param target_repo: Set the target repository name.
108 :param target_repo: Set the target repository name.
109 :type target_repo: str
109 :type target_repo: str
110 :param source_ref: Set the source ref name.
110 :param source_ref: Set the source ref name.
111 :type source_ref: str
111 :type source_ref: str
112 :param target_ref: Set the target ref name.
112 :param target_ref: Set the target ref name.
113 :type target_ref: str
113 :type target_ref: str
114 :param owner: user_id or username
114 :param owner: user_id or username
115 :type owner: Optional(str)
115 :type owner: Optional(str)
116 :param title: Optionally Set the pull request title, it's generated otherwise
116 :param title: Optionally Set the pull request title, it's generated otherwise
117 :type title: str
117 :type title: str
118 :param description: Set the pull request description.
118 :param description: Set the pull request description.
119 :type description: Optional(str)
119 :type description: Optional(str)
120 :type description_renderer: Optional(str)
120 :type description_renderer: Optional(str)
121 :param description_renderer: Set pull request renderer for the description.
121 :param description_renderer: Set pull request renderer for the description.
122 It should be 'rst', 'markdown' or 'plain'. If not give default
122 It should be 'rst', 'markdown' or 'plain'. If not give default
123 system renderer will be used
123 system renderer will be used
124 :param reviewers: Set the new pull request reviewers list.
124 :param reviewers: Set the new pull request reviewers list.
125 Reviewer defined by review rules will be added automatically to the
125 Reviewer defined by review rules will be added automatically to the
126 defined list.
126 defined list.
127 :type reviewers: Optional(list)
127 :type reviewers: Optional(list)
128 Accepts username strings or objects of the format:
128 Accepts username strings or objects of the format:
129
129
130 [{'username': 'nick', 'reasons': ['original author'], 'mandatory': <bool>}]
130 [{'username': 'nick', 'reasons': ['original author'], 'mandatory': <bool>}]
131 :param observers: Set the new pull request observers list.
132 Reviewer defined by review rules will be added automatically to the
133 defined list. This feature is only available in RhodeCode EE
134 :type observers: Optional(list)
135 Accepts username strings or objects of the format:
136
137 [{'username': 'nick', 'reasons': ['original author']}]
131
138
132
139
133 get_pull_request
140 get_pull_request
134 ----------------
141 ----------------
135
142
136 .. py:function:: get_pull_request(apiuser, pullrequestid, repoid=<Optional:None>, merge_state=<Optional:False>)
143 .. py:function:: get_pull_request(apiuser, pullrequestid, repoid=<Optional:None>, merge_state=<Optional:False>)
137
144
138 Get a pull request based on the given ID.
145 Get a pull request based on the given ID.
139
146
140 :param apiuser: This is filled automatically from the |authtoken|.
147 :param apiuser: This is filled automatically from the |authtoken|.
141 :type apiuser: AuthUser
148 :type apiuser: AuthUser
142 :param repoid: Optional, repository name or repository ID from where
149 :param repoid: Optional, repository name or repository ID from where
143 the pull request was opened.
150 the pull request was opened.
144 :type repoid: str or int
151 :type repoid: str or int
145 :param pullrequestid: ID of the requested pull request.
152 :param pullrequestid: ID of the requested pull request.
146 :type pullrequestid: int
153 :type pullrequestid: int
147 :param merge_state: Optional calculate merge state for each repository.
154 :param merge_state: Optional calculate merge state for each repository.
148 This could result in longer time to fetch the data
155 This could result in longer time to fetch the data
149 :type merge_state: bool
156 :type merge_state: bool
150
157
151 Example output:
158 Example output:
152
159
153 .. code-block:: bash
160 .. code-block:: bash
154
161
155 "id": <id_given_in_input>,
162 "id": <id_given_in_input>,
156 "result":
163 "result":
157 {
164 {
158 "pull_request_id": "<pull_request_id>",
165 "pull_request_id": "<pull_request_id>",
159 "url": "<url>",
166 "url": "<url>",
160 "title": "<title>",
167 "title": "<title>",
161 "description": "<description>",
168 "description": "<description>",
162 "status" : "<status>",
169 "status" : "<status>",
163 "created_on": "<date_time_created>",
170 "created_on": "<date_time_created>",
164 "updated_on": "<date_time_updated>",
171 "updated_on": "<date_time_updated>",
165 "versions": "<number_or_versions_of_pr>",
172 "versions": "<number_or_versions_of_pr>",
166 "commit_ids": [
173 "commit_ids": [
167 ...
174 ...
168 "<commit_id>",
175 "<commit_id>",
169 "<commit_id>",
176 "<commit_id>",
170 ...
177 ...
171 ],
178 ],
172 "review_status": "<review_status>",
179 "review_status": "<review_status>",
173 "mergeable": {
180 "mergeable": {
174 "status": "<bool>",
181 "status": "<bool>",
175 "message": "<message>",
182 "message": "<message>",
176 },
183 },
177 "source": {
184 "source": {
178 "clone_url": "<clone_url>",
185 "clone_url": "<clone_url>",
179 "repository": "<repository_name>",
186 "repository": "<repository_name>",
180 "reference":
187 "reference":
181 {
188 {
182 "name": "<name>",
189 "name": "<name>",
183 "type": "<type>",
190 "type": "<type>",
184 "commit_id": "<commit_id>",
191 "commit_id": "<commit_id>",
185 }
192 }
186 },
193 },
187 "target": {
194 "target": {
188 "clone_url": "<clone_url>",
195 "clone_url": "<clone_url>",
189 "repository": "<repository_name>",
196 "repository": "<repository_name>",
190 "reference":
197 "reference":
191 {
198 {
192 "name": "<name>",
199 "name": "<name>",
193 "type": "<type>",
200 "type": "<type>",
194 "commit_id": "<commit_id>",
201 "commit_id": "<commit_id>",
195 }
202 }
196 },
203 },
197 "merge": {
204 "merge": {
198 "clone_url": "<clone_url>",
205 "clone_url": "<clone_url>",
199 "reference":
206 "reference":
200 {
207 {
201 "name": "<name>",
208 "name": "<name>",
202 "type": "<type>",
209 "type": "<type>",
203 "commit_id": "<commit_id>",
210 "commit_id": "<commit_id>",
204 }
211 }
205 },
212 },
206 "author": <user_obj>,
213 "author": <user_obj>,
207 "reviewers": [
214 "reviewers": [
208 ...
215 ...
209 {
216 {
210 "user": "<user_obj>",
217 "user": "<user_obj>",
211 "review_status": "<review_status>",
218 "review_status": "<review_status>",
212 }
219 }
213 ...
220 ...
214 ]
221 ]
215 },
222 },
216 "error": null
223 "error": null
217
224
218
225
219 get_pull_request_comments
226 get_pull_request_comments
220 -------------------------
227 -------------------------
221
228
222 .. py:function:: get_pull_request_comments(apiuser, pullrequestid, repoid=<Optional:None>)
229 .. py:function:: get_pull_request_comments(apiuser, pullrequestid, repoid=<Optional:None>)
223
230
224 Get all comments of pull request specified with the `pullrequestid`
231 Get all comments of pull request specified with the `pullrequestid`
225
232
226 :param apiuser: This is filled automatically from the |authtoken|.
233 :param apiuser: This is filled automatically from the |authtoken|.
227 :type apiuser: AuthUser
234 :type apiuser: AuthUser
228 :param repoid: Optional repository name or repository ID.
235 :param repoid: Optional repository name or repository ID.
229 :type repoid: str or int
236 :type repoid: str or int
230 :param pullrequestid: The pull request ID.
237 :param pullrequestid: The pull request ID.
231 :type pullrequestid: int
238 :type pullrequestid: int
232
239
233 Example output:
240 Example output:
234
241
235 .. code-block:: bash
242 .. code-block:: bash
236
243
237 id : <id_given_in_input>
244 id : <id_given_in_input>
238 result : [
245 result : [
239 {
246 {
240 "comment_author": {
247 "comment_author": {
241 "active": true,
248 "active": true,
242 "full_name_or_username": "Tom Gore",
249 "full_name_or_username": "Tom Gore",
243 "username": "admin"
250 "username": "admin"
244 },
251 },
245 "comment_created_on": "2017-01-02T18:43:45.533",
252 "comment_created_on": "2017-01-02T18:43:45.533",
246 "comment_f_path": null,
253 "comment_f_path": null,
247 "comment_id": 25,
254 "comment_id": 25,
248 "comment_lineno": null,
255 "comment_lineno": null,
249 "comment_status": {
256 "comment_status": {
250 "status": "under_review",
257 "status": "under_review",
251 "status_lbl": "Under Review"
258 "status_lbl": "Under Review"
252 },
259 },
253 "comment_text": "Example text",
260 "comment_text": "Example text",
254 "comment_type": null,
261 "comment_type": null,
255 "comment_last_version: 0,
262 "comment_last_version: 0,
256 "pull_request_version": null,
263 "pull_request_version": null,
257 "comment_commit_id": None,
264 "comment_commit_id": None,
258 "comment_pull_request_id": <pull_request_id>
265 "comment_pull_request_id": <pull_request_id>
259 }
266 }
260 ],
267 ],
261 error : null
268 error : null
262
269
263
270
264 get_pull_requests
271 get_pull_requests
265 -----------------
272 -----------------
266
273
267 .. py:function:: get_pull_requests(apiuser, repoid, status=<Optional:'new'>, merge_state=<Optional:False>)
274 .. py:function:: get_pull_requests(apiuser, repoid, status=<Optional:'new'>, merge_state=<Optional:False>)
268
275
269 Get all pull requests from the repository specified in `repoid`.
276 Get all pull requests from the repository specified in `repoid`.
270
277
271 :param apiuser: This is filled automatically from the |authtoken|.
278 :param apiuser: This is filled automatically from the |authtoken|.
272 :type apiuser: AuthUser
279 :type apiuser: AuthUser
273 :param repoid: Optional repository name or repository ID.
280 :param repoid: Optional repository name or repository ID.
274 :type repoid: str or int
281 :type repoid: str or int
275 :param status: Only return pull requests with the specified status.
282 :param status: Only return pull requests with the specified status.
276 Valid options are.
283 Valid options are.
277 * ``new`` (default)
284 * ``new`` (default)
278 * ``open``
285 * ``open``
279 * ``closed``
286 * ``closed``
280 :type status: str
287 :type status: str
281 :param merge_state: Optional calculate merge state for each repository.
288 :param merge_state: Optional calculate merge state for each repository.
282 This could result in longer time to fetch the data
289 This could result in longer time to fetch the data
283 :type merge_state: bool
290 :type merge_state: bool
284
291
285 Example output:
292 Example output:
286
293
287 .. code-block:: bash
294 .. code-block:: bash
288
295
289 "id": <id_given_in_input>,
296 "id": <id_given_in_input>,
290 "result":
297 "result":
291 [
298 [
292 ...
299 ...
293 {
300 {
294 "pull_request_id": "<pull_request_id>",
301 "pull_request_id": "<pull_request_id>",
295 "url": "<url>",
302 "url": "<url>",
296 "title" : "<title>",
303 "title" : "<title>",
297 "description": "<description>",
304 "description": "<description>",
298 "status": "<status>",
305 "status": "<status>",
299 "created_on": "<date_time_created>",
306 "created_on": "<date_time_created>",
300 "updated_on": "<date_time_updated>",
307 "updated_on": "<date_time_updated>",
301 "commit_ids": [
308 "commit_ids": [
302 ...
309 ...
303 "<commit_id>",
310 "<commit_id>",
304 "<commit_id>",
311 "<commit_id>",
305 ...
312 ...
306 ],
313 ],
307 "review_status": "<review_status>",
314 "review_status": "<review_status>",
308 "mergeable": {
315 "mergeable": {
309 "status": "<bool>",
316 "status": "<bool>",
310 "message: "<message>",
317 "message: "<message>",
311 },
318 },
312 "source": {
319 "source": {
313 "clone_url": "<clone_url>",
320 "clone_url": "<clone_url>",
314 "reference":
321 "reference":
315 {
322 {
316 "name": "<name>",
323 "name": "<name>",
317 "type": "<type>",
324 "type": "<type>",
318 "commit_id": "<commit_id>",
325 "commit_id": "<commit_id>",
319 }
326 }
320 },
327 },
321 "target": {
328 "target": {
322 "clone_url": "<clone_url>",
329 "clone_url": "<clone_url>",
323 "reference":
330 "reference":
324 {
331 {
325 "name": "<name>",
332 "name": "<name>",
326 "type": "<type>",
333 "type": "<type>",
327 "commit_id": "<commit_id>",
334 "commit_id": "<commit_id>",
328 }
335 }
329 },
336 },
330 "merge": {
337 "merge": {
331 "clone_url": "<clone_url>",
338 "clone_url": "<clone_url>",
332 "reference":
339 "reference":
333 {
340 {
334 "name": "<name>",
341 "name": "<name>",
335 "type": "<type>",
342 "type": "<type>",
336 "commit_id": "<commit_id>",
343 "commit_id": "<commit_id>",
337 }
344 }
338 },
345 },
339 "author": <user_obj>,
346 "author": <user_obj>,
340 "reviewers": [
347 "reviewers": [
341 ...
348 ...
342 {
349 {
343 "user": "<user_obj>",
350 "user": "<user_obj>",
344 "review_status": "<review_status>",
351 "review_status": "<review_status>",
345 }
352 }
346 ...
353 ...
347 ]
354 ]
348 }
355 }
349 ...
356 ...
350 ],
357 ],
351 "error": null
358 "error": null
352
359
353
360
354 merge_pull_request
361 merge_pull_request
355 ------------------
362 ------------------
356
363
357 .. py:function:: merge_pull_request(apiuser, pullrequestid, repoid=<Optional:None>, userid=<Optional:<OptionalAttr:apiuser>>)
364 .. py:function:: merge_pull_request(apiuser, pullrequestid, repoid=<Optional:None>, userid=<Optional:<OptionalAttr:apiuser>>)
358
365
359 Merge the pull request specified by `pullrequestid` into its target
366 Merge the pull request specified by `pullrequestid` into its target
360 repository.
367 repository.
361
368
362 :param apiuser: This is filled automatically from the |authtoken|.
369 :param apiuser: This is filled automatically from the |authtoken|.
363 :type apiuser: AuthUser
370 :type apiuser: AuthUser
364 :param repoid: Optional, repository name or repository ID of the
371 :param repoid: Optional, repository name or repository ID of the
365 target repository to which the |pr| is to be merged.
372 target repository to which the |pr| is to be merged.
366 :type repoid: str or int
373 :type repoid: str or int
367 :param pullrequestid: ID of the pull request which shall be merged.
374 :param pullrequestid: ID of the pull request which shall be merged.
368 :type pullrequestid: int
375 :type pullrequestid: int
369 :param userid: Merge the pull request as this user.
376 :param userid: Merge the pull request as this user.
370 :type userid: Optional(str or int)
377 :type userid: Optional(str or int)
371
378
372 Example output:
379 Example output:
373
380
374 .. code-block:: bash
381 .. code-block:: bash
375
382
376 "id": <id_given_in_input>,
383 "id": <id_given_in_input>,
377 "result": {
384 "result": {
378 "executed": "<bool>",
385 "executed": "<bool>",
379 "failure_reason": "<int>",
386 "failure_reason": "<int>",
380 "merge_status_message": "<str>",
387 "merge_status_message": "<str>",
381 "merge_commit_id": "<merge_commit_id>",
388 "merge_commit_id": "<merge_commit_id>",
382 "possible": "<bool>",
389 "possible": "<bool>",
383 "merge_ref": {
390 "merge_ref": {
384 "commit_id": "<commit_id>",
391 "commit_id": "<commit_id>",
385 "type": "<type>",
392 "type": "<type>",
386 "name": "<name>"
393 "name": "<name>"
387 }
394 }
388 },
395 },
389 "error": null
396 "error": null
390
397
391
398
392 update_pull_request
399 update_pull_request
393 -------------------
400 -------------------
394
401
395 .. py:function:: update_pull_request(apiuser, pullrequestid, repoid=<Optional:None>, title=<Optional:''>, description=<Optional:''>, description_renderer=<Optional:''>, reviewers=<Optional:None>, update_commits=<Optional:None>)
402 .. py:function:: update_pull_request(apiuser, pullrequestid, repoid=<Optional:None>, title=<Optional:''>, description=<Optional:''>, description_renderer=<Optional:''>, reviewers=<Optional:None>, observers=<Optional:None>, update_commits=<Optional:None>)
396
403
397 Updates a pull request.
404 Updates a pull request.
398
405
399 :param apiuser: This is filled automatically from the |authtoken|.
406 :param apiuser: This is filled automatically from the |authtoken|.
400 :type apiuser: AuthUser
407 :type apiuser: AuthUser
401 :param repoid: Optional repository name or repository ID.
408 :param repoid: Optional repository name or repository ID.
402 :type repoid: str or int
409 :type repoid: str or int
403 :param pullrequestid: The pull request ID.
410 :param pullrequestid: The pull request ID.
404 :type pullrequestid: int
411 :type pullrequestid: int
405 :param title: Set the pull request title.
412 :param title: Set the pull request title.
406 :type title: str
413 :type title: str
407 :param description: Update pull request description.
414 :param description: Update pull request description.
408 :type description: Optional(str)
415 :type description: Optional(str)
409 :type description_renderer: Optional(str)
416 :type description_renderer: Optional(str)
410 :param description_renderer: Update pull request renderer for the description.
417 :param description_renderer: Update pull request renderer for the description.
411 It should be 'rst', 'markdown' or 'plain'
418 It should be 'rst', 'markdown' or 'plain'
412 :param reviewers: Update pull request reviewers list with new value.
419 :param reviewers: Update pull request reviewers list with new value.
413 :type reviewers: Optional(list)
420 :type reviewers: Optional(list)
414 Accepts username strings or objects of the format:
421 Accepts username strings or objects of the format:
415
422
416 [{'username': 'nick', 'reasons': ['original author'], 'mandatory': <bool>}]
423 [{'username': 'nick', 'reasons': ['original author'], 'mandatory': <bool>}]
424 :param observers: Update pull request observers list with new value.
425 :type observers: Optional(list)
426 Accepts username strings or objects of the format:
417
427
428 [{'username': 'nick', 'reasons': ['should be aware about this PR']}]
418 :param update_commits: Trigger update of commits for this pull request
429 :param update_commits: Trigger update of commits for this pull request
419 :type: update_commits: Optional(bool)
430 :type: update_commits: Optional(bool)
420
431
421 Example output:
432 Example output:
422
433
423 .. code-block:: bash
434 .. code-block:: bash
424
435
425 id : <id_given_in_input>
436 id : <id_given_in_input>
426 result : {
437 result : {
427 "msg": "Updated pull request `63`",
438 "msg": "Updated pull request `63`",
428 "pull_request": <pull_request_object>,
439 "pull_request": <pull_request_object>,
429 "updated_reviewers": {
440 "updated_reviewers": {
430 "added": [
441 "added": [
431 "username"
442 "username"
432 ],
443 ],
433 "removed": []
444 "removed": []
434 },
445 },
446 "updated_observers": {
447 "added": [
448 "username"
449 ],
450 "removed": []
451 },
435 "updated_commits": {
452 "updated_commits": {
436 "added": [
453 "added": [
437 "<sha1_hash>"
454 "<sha1_hash>"
438 ],
455 ],
439 "common": [
456 "common": [
440 "<sha1_hash>",
457 "<sha1_hash>",
441 "<sha1_hash>",
458 "<sha1_hash>",
442 ],
459 ],
443 "removed": []
460 "removed": []
444 }
461 }
445 }
462 }
446 error : null
463 error : null
447
464
448
465
General Comments 0
You need to be logged in to leave comments. Login now