Show More
@@ -38,7 +38,7 b' changeset_comment' | |||
|
38 | 38 | |
|
39 | 39 | Example error output: |
|
40 | 40 | |
|
41 |
.. code-block:: |
|
|
41 | .. code-block:: json | |
|
42 | 42 | |
|
43 | 43 | { |
|
44 | 44 | "id" : <id_given_in_input>, |
@@ -169,8 +169,14 b' get_pull_request' | |||
|
169 | 169 | "commit_id": "<commit_id>", |
|
170 | 170 | } |
|
171 | 171 | }, |
|
172 |
" |
|
|
172 | "merge": { | |
|
173 | 173 | "clone_url": "<clone_url>", |
|
174 | "reference": | |
|
175 | { | |
|
176 | "name": "<name>", | |
|
177 | "type": "<type>", | |
|
178 | "commit_id": "<commit_id>", | |
|
179 | } | |
|
174 | 180 | }, |
|
175 | 181 | "author": <user_obj>, |
|
176 | 182 | "reviewers": [ |
@@ -248,8 +254,14 b' get_pull_requests' | |||
|
248 | 254 | "commit_id": "<commit_id>", |
|
249 | 255 | } |
|
250 | 256 | }, |
|
251 |
" |
|
|
257 | "merge": { | |
|
252 | 258 | "clone_url": "<clone_url>", |
|
259 | "reference": | |
|
260 | { | |
|
261 | "name": "<name>", | |
|
262 | "type": "<type>", | |
|
263 | "commit_id": "<commit_id>", | |
|
264 | } | |
|
253 | 265 | }, |
|
254 | 266 | "author": <user_obj>, |
|
255 | 267 | "reviewers": [ |
@@ -294,7 +306,12 b' merge_pull_request' | |||
|
294 | 306 | "executed": "<bool>", |
|
295 | 307 | "failure_reason": "<int>", |
|
296 | 308 | "merge_commit_id": "<merge_commit_id>", |
|
297 | "possible": "<bool>" | |
|
309 | "possible": "<bool>", | |
|
310 | "merge_ref": { | |
|
311 | "commit_id": "<commit_id>", | |
|
312 | "type": "<type>", | |
|
313 | "name": "<name>" | |
|
314 | } | |
|
298 | 315 | }, |
|
299 | 316 | "error": null |
|
300 | 317 |
@@ -6,19 +6,20 b' repo_group methods' | |||
|
6 | 6 | create_repo_group |
|
7 | 7 | ----------------- |
|
8 | 8 | |
|
9 |
.. py:function:: create_repo_group(apiuser, group_name, |
|
|
9 | .. py:function:: create_repo_group(apiuser, group_name, owner=<Optional:<OptionalAttr:apiuser>>, description=<Optional:''>, copy_permissions=<Optional:False>) | |
|
10 | 10 | |
|
11 | 11 | Creates a repository group. |
|
12 | 12 | |
|
13 |
* If the repository group name contains "/", |
|
|
14 | groups will be created. | |
|
13 | * If the repository group name contains "/", repository group will be | |
|
14 | created inside a repository group or nested repository groups | |
|
15 | 15 | |
|
16 |
For example "foo/bar/ |
|
|
17 | (with "foo" as parent). It will also create the "baz" repository | |
|
18 | with "bar" as |repo| group. | |
|
16 | For example "foo/bar/group1" will create repository group called "group1" | |
|
17 | inside group "foo/bar". You have to have permissions to access and | |
|
18 | write to the last repository group ("bar" in this example) | |
|
19 | 19 | |
|
20 |
This command can only be run using an |authtoken| with a |
|
|
21 | permissions. | |
|
20 | This command can only be run using an |authtoken| with at least | |
|
21 | permissions to create repository groups, or admin permissions to | |
|
22 | parent repository groups. | |
|
22 | 23 | |
|
23 | 24 | :param apiuser: This is filled automatically from the |authtoken|. |
|
24 | 25 | :type apiuser: AuthUser |
@@ -325,13 +326,22 b' revoke_user_permission_from_repo_group' | |||
|
325 | 326 | update_repo_group |
|
326 | 327 | ----------------- |
|
327 | 328 | |
|
328 |
.. py:function:: update_repo_group(apiuser, repogroupid, group_name=<Optional:''>, description=<Optional:''>, owner=<Optional:<OptionalAttr:apiuser> |
|
|
329 | .. py:function:: update_repo_group(apiuser, repogroupid, group_name=<Optional:''>, description=<Optional:''>, owner=<Optional:<OptionalAttr:apiuser>>, enable_locking=<Optional:False>) | |
|
329 | 330 | |
|
330 | 331 | Updates repository group with the details given. |
|
331 | 332 | |
|
332 | 333 | This command can only be run using an |authtoken| with admin |
|
333 | 334 | permissions. |
|
334 | 335 | |
|
336 | * If the group_name name contains "/", repository group will be updated | |
|
337 | accordingly with a repository group or nested repository groups | |
|
338 | ||
|
339 | For example repogroupid=group-test group_name="foo/bar/group-test" | |
|
340 | will update repository group called "group-test" and place it | |
|
341 | inside group "foo/bar". | |
|
342 | You have to have permissions to access and write to the last repository | |
|
343 | group ("bar" in this example) | |
|
344 | ||
|
335 | 345 | :param apiuser: This is filled automatically from the |authtoken|. |
|
336 | 346 | :type apiuser: AuthUser |
|
337 | 347 | :param repogroupid: Set the ID of repository group. |
@@ -342,8 +352,6 b' update_repo_group' | |||
|
342 | 352 | :type description: str |
|
343 | 353 | :param owner: Set the |repo| group owner. |
|
344 | 354 | :type owner: str |
|
345 | :param parent: Set the |repo| group parent. | |
|
346 | :type parent: str or int | |
|
347 | 355 | :param enable_locking: Enable |repo| locking. The default is false. |
|
348 | 356 | :type enable_locking: bool |
|
349 | 357 |
@@ -48,7 +48,7 b' comment_commit' | |||
|
48 | 48 | |
|
49 | 49 | Example error output: |
|
50 | 50 | |
|
51 |
.. code-block:: |
|
|
51 | .. code-block:: json | |
|
52 | 52 | |
|
53 | 53 | { |
|
54 | 54 | "id" : <id_given_in_input>, |
@@ -68,15 +68,16 b' create_repo' | |||
|
68 | 68 | |
|
69 | 69 | Creates a repository. |
|
70 | 70 | |
|
71 |
* If the repository name contains "/", |
|
|
72 | groups will be created. | |
|
71 | * If the repository name contains "/", repository will be created inside | |
|
72 | a repository group or nested repository groups | |
|
73 | 73 | |
|
74 |
For example "foo/bar/ |
|
|
75 | (with "foo" as parent). It will also create the "baz" repository | |
|
76 | with "bar" as |repo| group. | |
|
74 | For example "foo/bar/repo1" will create |repo| called "repo1" inside | |
|
75 | group "foo/bar". You have to have permissions to access and write to | |
|
76 | the last repository group ("bar" in this example) | |
|
77 | 77 | |
|
78 | 78 | This command can only be run using an |authtoken| with at least |
|
79 | write permissions to the |repo|. | |
|
79 | permissions to create repositories, or write permissions to | |
|
80 | parent repository groups. | |
|
80 | 81 | |
|
81 | 82 | :param apiuser: This is filled automatically from the |authtoken|. |
|
82 | 83 | :type apiuser: AuthUser |
@@ -88,9 +89,9 b' create_repo' | |||
|
88 | 89 | :type owner: Optional(str) |
|
89 | 90 | :param description: Set the repository description. |
|
90 | 91 | :type description: Optional(str) |
|
91 | :param private: | |
|
92 | :param private: set repository as private | |
|
92 | 93 | :type private: bool |
|
93 | :param clone_uri: | |
|
94 | :param clone_uri: set clone_uri | |
|
94 | 95 | :type clone_uri: str |
|
95 | 96 | :param landing_rev: <rev_type>:<rev> |
|
96 | 97 | :type landing_rev: str |
@@ -164,25 +165,29 b' delete_repo' | |||
|
164 | 165 | fork_repo |
|
165 | 166 | --------- |
|
166 | 167 | |
|
167 |
.. py:function:: fork_repo(apiuser, repoid, fork_name, owner=<Optional:<OptionalAttr:apiuser>>, description=<Optional:''>, |
|
|
168 | .. py:function:: fork_repo(apiuser, repoid, fork_name, owner=<Optional:<OptionalAttr:apiuser>>, description=<Optional:''>, private=<Optional:False>, clone_uri=<Optional:None>, landing_rev=<Optional:'rev:tip'>, copy_permissions=<Optional:False>) | |
|
168 | 169 | |
|
169 | 170 | Creates a fork of the specified |repo|. |
|
170 | 171 | |
|
171 | * If using |RCE| with Celery this will immediately return a success | |
|
172 | message, even though the fork will be created asynchronously. | |
|
172 | * If the fork_name contains "/", fork will be created inside | |
|
173 | a repository group or nested repository groups | |
|
173 | 174 | |
|
174 | This command can only be run using an |authtoken| with fork | |
|
175 | permissions on the |repo|. | |
|
175 | For example "foo/bar/fork-repo" will create fork called "fork-repo" | |
|
176 | inside group "foo/bar". You have to have permissions to access and | |
|
177 | write to the last repository group ("bar" in this example) | |
|
178 | ||
|
179 | This command can only be run using an |authtoken| with minimum | |
|
180 | read permissions of the forked repo, create fork permissions for an user. | |
|
176 | 181 | |
|
177 | 182 | :param apiuser: This is filled automatically from the |authtoken|. |
|
178 | 183 | :type apiuser: AuthUser |
|
179 | 184 | :param repoid: Set repository name or repository ID. |
|
180 | 185 | :type repoid: str or int |
|
181 | :param fork_name: Set the fork name. | |
|
186 | :param fork_name: Set the fork name, including it's repository group membership. | |
|
182 | 187 | :type fork_name: str |
|
183 | 188 | :param owner: Set the fork owner. |
|
184 | 189 | :type owner: str |
|
185 | :param description: Set the fork descripton. | |
|
190 | :param description: Set the fork description. | |
|
186 | 191 | :type description: str |
|
187 | 192 | :param copy_permissions: Copy permissions from parent |repo|. The |
|
188 | 193 | default is False. |
@@ -923,24 +928,31 b' strip' | |||
|
923 | 928 | update_repo |
|
924 | 929 | ----------- |
|
925 | 930 | |
|
926 | .. py:function:: update_repo(apiuser, repoid, name=<Optional:None>, owner=<Optional:<OptionalAttr:apiuser>>, group=<Optional:None>, fork_of=<Optional:None>, description=<Optional:''>, private=<Optional:False>, clone_uri=<Optional:None>, landing_rev=<Optional:'rev:tip'>, enable_statistics=<Optional:False>, enable_locking=<Optional:False>, enable_downloads=<Optional:False>, fields=<Optional:''>) | |
|
931 | .. py:function:: update_repo(apiuser, repoid, repo_name=<Optional:None>, owner=<Optional:<OptionalAttr:apiuser>>, description=<Optional:''>, private=<Optional:False>, clone_uri=<Optional:None>, landing_rev=<Optional:'rev:tip'>, fork_of=<Optional:None>, enable_statistics=<Optional:False>, enable_locking=<Optional:False>, enable_downloads=<Optional:False>, fields=<Optional:''>) | |
|
927 | 932 | |
|
928 | 933 | Updates a repository with the given information. |
|
929 | 934 | |
|
930 | 935 | This command can only be run using an |authtoken| with at least |
|
931 |
|
|
|
936 | admin permissions to the |repo|. | |
|
937 | ||
|
938 | * If the repository name contains "/", repository will be updated | |
|
939 | accordingly with a repository group or nested repository groups | |
|
940 | ||
|
941 | For example repoid=repo-test name="foo/bar/repo-test" will update |repo| | |
|
942 | called "repo-test" and place it inside group "foo/bar". | |
|
943 | You have to have permissions to access and write to the last repository | |
|
944 | group ("bar" in this example) | |
|
932 | 945 | |
|
933 | 946 | :param apiuser: This is filled automatically from the |authtoken|. |
|
934 | 947 | :type apiuser: AuthUser |
|
935 | 948 | :param repoid: repository name or repository ID. |
|
936 | 949 | :type repoid: str or int |
|
937 |
:param name: Update the |repo| name |
|
|
938 | :type name: str | |
|
950 | :param repo_name: Update the |repo| name, including the | |
|
951 | repository group it's in. | |
|
952 | :type repo_name: str | |
|
939 | 953 | :param owner: Set the |repo| owner. |
|
940 | 954 | :type owner: str |
|
941 |
:param |
|
|
942 | :type group: str | |
|
943 | :param fork_of: Set the master |repo| name. | |
|
955 | :param fork_of: Set the |repo| as fork of another |repo|. | |
|
944 | 956 | :type fork_of: str |
|
945 | 957 | :param description: Update the |repo| description. |
|
946 | 958 | :type description: str |
@@ -948,16 +960,13 b' update_repo' | |||
|
948 | 960 | :type private: bool |
|
949 | 961 | :param clone_uri: Update the |repo| clone URI. |
|
950 | 962 | :type clone_uri: str |
|
951 | :param landing_rev: Set the |repo| landing revision. Default is | |
|
952 | ``tip``. | |
|
963 | :param landing_rev: Set the |repo| landing revision. Default is ``rev:tip``. | |
|
953 | 964 | :type landing_rev: str |
|
954 | :param enable_statistics: Enable statistics on the |repo|, | |
|
955 | (True | False). | |
|
965 | :param enable_statistics: Enable statistics on the |repo|, (True | False). | |
|
956 | 966 | :type enable_statistics: bool |
|
957 | 967 | :param enable_locking: Enable |repo| locking. |
|
958 | 968 | :type enable_locking: bool |
|
959 | :param enable_downloads: Enable downloads from the |repo|, | |
|
960 | (True | False). | |
|
969 | :param enable_downloads: Enable downloads from the |repo|, (True | False). | |
|
961 | 970 | :type enable_downloads: bool |
|
962 | 971 | :param fields: Add extra fields to the |repo|. Use the following |
|
963 | 972 | example format: ``field_key=field_val,field_key2=fieldval2``. |
@@ -6,7 +6,7 b' user methods' | |||
|
6 | 6 | create_user |
|
7 | 7 | ----------- |
|
8 | 8 | |
|
9 | .. py:function:: create_user(apiuser, username, email, password=<Optional:''>, firstname=<Optional:''>, lastname=<Optional:''>, active=<Optional:True>, admin=<Optional:False>, extern_name=<Optional:'rhodecode'>, extern_type=<Optional:'rhodecode'>, force_password_change=<Optional:False>) | |
|
9 | .. py:function:: create_user(apiuser, username, email, password=<Optional:''>, firstname=<Optional:''>, lastname=<Optional:''>, active=<Optional:True>, admin=<Optional:False>, extern_name=<Optional:'rhodecode'>, extern_type=<Optional:'rhodecode'>, force_password_change=<Optional:False>, create_personal_repo_group=<Optional:None>) | |
|
10 | 10 | |
|
11 | 11 | Creates a new user and returns the new user object. |
|
12 | 12 | |
@@ -39,7 +39,8 b' create_user' | |||
|
39 | 39 | :param force_password_change: Force the new user to change password |
|
40 | 40 | on next login. |
|
41 | 41 | :type force_password_change: Optional(``True`` | ``False``) |
|
42 | ||
|
42 | :param create_personal_repo_group: Create personal repo group for this user | |
|
43 | :type create_personal_repo_group: Optional(``True`` | ``False``) | |
|
43 | 44 | Example output: |
|
44 | 45 | |
|
45 | 46 | .. code-block:: bash |
@@ -163,6 +164,7 b' get_user' | |||
|
163 | 164 | "usergroup.read", |
|
164 | 165 | "hg.repogroup.create.false", |
|
165 | 166 | "hg.create.none", |
|
167 | "hg.password_reset.enabled", | |
|
166 | 168 | "hg.extern_activate.manual", |
|
167 | 169 | "hg.create.write_on_repogroup.false", |
|
168 | 170 | "hg.usergroup.create.false", |
General Comments 0
You need to be logged in to leave comments.
Login now