@@ -355,6 +355,8 @@ def set_project_avatar(self, key, icon, content_type="image/png"):
355
355
def project_keys (self , key , start = 0 , limit = None , filter_str = None ):
356
356
"""
357
357
Get SSH access keys added to the project
358
+ :param start:
359
+ :param limit:
358
360
:param key: The project key
359
361
:param filter_str: OPTIONAL: users filter string
360
362
:return: The list of SSH access keys
@@ -437,6 +439,9 @@ def _url_project_groups(self, project_key):
437
439
def project_groups (self , key , start = 0 , limit = None , filter_str = None ):
438
440
"""
439
441
Get Project Groups
442
+ :param limit:
443
+ :param limit:
444
+ :param start:
440
445
:param key: The project key
441
446
:param filter_str: OPTIONAL: group filter string
442
447
:return:
@@ -574,8 +579,10 @@ def _url_repos(self, project_key, api_root=None, api_version=None):
574
579
def repo_list (self , project_key , start = 0 , limit = 25 ):
575
580
"""
576
581
Get repositories list from project
577
- :param project_key: The project key
578
582
583
+ :param project_key: The project key
584
+ :param start:
585
+ :param limit:
579
586
:return:
580
587
"""
581
588
url = self ._url_repos (project_key )
@@ -605,7 +612,6 @@ def create_repo(self, project_key, repository_slug, forkable=False, is_private=T
605
612
:param project_key: The project matching the projectKey supplied in the resource path as shown in URL.
606
613
:type project_key: str
607
614
:param repository_slug: Name of repository to create (i.e. "My repo").
608
- :type repository: str
609
615
:param forkable: Set the repository to be forkable or not.
610
616
:type forkable: bool
611
617
:param is_private: Set the repository to be private or not.
@@ -715,6 +721,8 @@ def fork_repository(self, project_key, repository_slug, new_repository_slug):
715
721
def repo_keys (self , project_key , repo_key , start = 0 , limit = None , filter_str = None ):
716
722
"""
717
723
Get SSH access keys added to the repository
724
+ :param start:
725
+ :param limit:
718
726
:param project_key: The project key
719
727
:param repo_key: The repository key
720
728
:param filter_str: OPTIONAL: users filter string
@@ -736,6 +744,8 @@ def _url_repo_users(self, project_key, repo):
736
744
def repo_users (self , project_key , repo_key , start = 0 , limit = None , filter_str = None ):
737
745
"""
738
746
Get users who has permission in repository
747
+ :param start:
748
+ :param limit:
739
749
:param project_key: The project key
740
750
:param repo_key: The repository key
741
751
:param filter_str: OPTIONAL: Users filter string
@@ -786,6 +796,8 @@ def _url_repo_groups(self, project_key, repo):
786
796
def repo_groups (self , project_key , repo_key , start = 0 , limit = None , filter_str = None ):
787
797
"""
788
798
Get repository Groups
799
+ :param start:
800
+ :param limit:
789
801
:param project_key: The project key
790
802
:param repo_key: The repository key
791
803
:param filter_str: OPTIONAL: group filter string
@@ -957,7 +969,6 @@ def create_branch(self, project_key, repository_slug, name, start_point, message
957
969
:param project_key: The project matching the projectKey supplied in the resource path as shown in URL.
958
970
:type project_key: str
959
971
:param repository_slug: Name of repository where branch is created (i.e. "my_repo").
960
- :type repository: str
961
972
:param name: Name of branch to create (i.e. "my_branch").
962
973
:type name: str
963
974
:param start_point: Name of branch to branch from.
@@ -1258,6 +1269,7 @@ def delete_pull_request(self, project_key, repository_slug, pull_request_id, pul
1258
1269
def get_pull_requests_activities (self , project_key , repository_slug , pull_request_id , start = 0 , limit = None ):
1259
1270
"""
1260
1271
Get pull requests activities
1272
+ :param limit:
1261
1273
:param project_key:
1262
1274
:param repository_slug:
1263
1275
:param pull_request_id: the ID of the pull request within the repository
@@ -1275,6 +1287,8 @@ def get_pull_requests_activities(self, project_key, repository_slug, pull_reques
1275
1287
def get_pull_requests_changes (self , project_key , repository_slug , pull_request_id , start = 0 , limit = None ):
1276
1288
"""
1277
1289
Get pull requests changes
1290
+ :param start:
1291
+ :param limit:
1278
1292
:param project_key:
1279
1293
:param repository_slug:
1280
1294
:param pull_request_id: the ID of the pull request within the repository
@@ -1291,6 +1305,8 @@ def get_pull_requests_changes(self, project_key, repository_slug, pull_request_i
1291
1305
def get_pull_requests_commits (self , project_key , repository_slug , pull_request_id , start = 0 , limit = None ):
1292
1306
"""
1293
1307
Get pull requests commits
1308
+ :param start:
1309
+ :param limit:
1294
1310
:param project_key:
1295
1311
:param repository_slug:
1296
1312
:param pull_request_id: the ID of the pull request within the repository
@@ -1312,6 +1328,8 @@ def _url_pull_request_participants(self, project_key, repository_slug, pull_requ
1312
1328
def get_pull_requests_participants (self , project_key , repository_slug , pull_request_id , start = 0 , limit = None ):
1313
1329
"""
1314
1330
Get all participants of a pull request
1331
+ :param start:
1332
+ :param limit:
1315
1333
:param project_key:
1316
1334
:param repository_slug:
1317
1335
:param pull_request_id:
@@ -1668,6 +1686,7 @@ def get_commits(
1668
1686
def get_changelog (self , project_key , repository_slug , ref_from , ref_to , start = 0 , limit = None ):
1669
1687
"""
1670
1688
Get change log between 2 refs
1689
+ :param start:
1671
1690
:param project_key:
1672
1691
:param repository_slug:
1673
1692
:param ref_from:
@@ -1780,6 +1799,7 @@ def get_file_list(self, project_key, repository_slug, query=None, start=0, limit
1780
1799
Retrieve a page of files from particular directory of a repository.
1781
1800
The search is done recursively, so all files from any sub-directory of the specified directory will be returned.
1782
1801
The authenticated user must have REPO_READ permission for the specified repository to call this resource.
1802
+ :param start:
1783
1803
:param project_key:
1784
1804
:param repository_slug:
1785
1805
:param query: the commit ID or ref (e.g. a branch or tag) to list the files at.
@@ -2241,6 +2261,7 @@ def get_repositories(self, workspace, role=None, query=None, sort=None):
2241
2261
"""
2242
2262
Get all repositories in a workspace.
2243
2263
2264
+ :param workspace:
2244
2265
:param role: Filters the result based on the authenticated user's role on each repository.
2245
2266
One of: member, contributor, admin, owner
2246
2267
:param query: Query string to narrow down the response.
@@ -2261,6 +2282,9 @@ def get_pipelines(self, workspace, repository_slug, number=10, sort_by="-created
2261
2282
"""
2262
2283
Get information about latest pipelines runs.
2263
2284
2285
+ :param workspace:
2286
+ :param repository_slug:
2287
+ :param sort_by:
2264
2288
:param number: number of pipelines to fetch
2265
2289
:param :sort_by: optional key to sort available pipelines for
2266
2290
:return: List of pipeline data
@@ -2307,6 +2331,8 @@ def trigger_pipeline(self, workspace, repository_slug, branch="master", revision
2307
2331
def get_pipeline (self , workspace , repository_slug , uuid ):
2308
2332
"""
2309
2333
Get information about the pipeline specified by ``uuid``.
2334
+ :param workspace:
2335
+ :param repository_slug:
2310
2336
:param uuid: Pipeline identifier (with surrounding {}; NOT the build number)
2311
2337
"""
2312
2338
return (
@@ -2324,6 +2350,8 @@ def get_pipeline(self, workspace, repository_slug, uuid):
2324
2350
def stop_pipeline (self , workspace , repository_slug , uuid ):
2325
2351
"""
2326
2352
Stop the pipeline specified by ``uuid``.
2353
+ :param workspace:
2354
+ :param repository_slug:
2327
2355
:param uuid: Pipeline identifier (with surrounding {}; NOT the build number)
2328
2356
2329
2357
See the documentation for the meaning of response status codes.
@@ -2343,6 +2371,8 @@ def stop_pipeline(self, workspace, repository_slug, uuid):
2343
2371
def get_pipeline_steps (self , workspace , repository_slug , uuid ):
2344
2372
"""
2345
2373
Get information about the steps of the pipeline specified by ``uuid``.
2374
+ :param workspace:
2375
+ :param repository_slug:
2346
2376
:param uuid: Pipeline identifier (with surrounding {}; NOT the build number)
2347
2377
"""
2348
2378
values = []
@@ -2364,6 +2394,8 @@ def get_pipeline_steps(self, workspace, repository_slug, uuid):
2364
2394
def get_pipeline_step (self , workspace , repository_slug , pipeline_uuid , step_uuid ):
2365
2395
"""
2366
2396
Get information about a step of a pipeline, specified by respective UUIDs.
2397
+ :param workspace:
2398
+ :param repository_slug:
2367
2399
:param pipeline_uuid: Pipeline identifier (with surrounding {}; NOT the build number)
2368
2400
:param step_uuid: Step identifier (with surrounding {})
2369
2401
"""
@@ -2383,6 +2415,8 @@ def get_pipeline_step(self, workspace, repository_slug, pipeline_uuid, step_uuid
2383
2415
def get_pipeline_step_log (self , workspace , repository_slug , pipeline_uuid , step_uuid ):
2384
2416
"""
2385
2417
Get log of a step of a pipeline, specified by respective UUIDs.
2418
+ :param workspace:
2419
+ :param repository_slug:
2386
2420
:param pipeline_uuid: Pipeline identifier (with surrounding {}; NOT the build number)
2387
2421
:param step_uuid: Step identifier (with surrounding {})
2388
2422
:return: byte string log
@@ -2411,6 +2445,10 @@ def create_issue(
2411
2445
):
2412
2446
"""
2413
2447
Create a new issue in the issue tracker of the given repository.
2448
+ :param workspace:
2449
+ :param repository_slug:
2450
+ :param title:
2451
+ :param description:
2414
2452
:param kind: one of: bug, enhancement, proposal, task
2415
2453
:param priority: one of: trivial, minor, major, critical, blocker
2416
2454
"""
@@ -2430,6 +2468,8 @@ def get_issues(self, workspace, repository_slug, sort_by=None, query=None):
2430
2468
"""
2431
2469
Get information about the issues tracked in the given repository. By
2432
2470
default, the issues are sorted by ID in descending order.
2471
+ :param workspace:
2472
+ :param repository_slug:
2433
2473
:param sort_by: optional key to sort available issues for
2434
2474
:param query: optional query to filter available issues for. See
2435
2475
https://developer.atlassian.com/bitbucket/api/2/reference/meta/filtering
@@ -2518,6 +2558,9 @@ def add_branch_restriction(
2518
2558
"""
2519
2559
Add a new branch restriction.
2520
2560
2561
+ :param workspace:
2562
+ :param repository_slug:
2563
+ :param value:
2521
2564
:param kind: One of require_tasks_to_be_completed, force, restrict_merges,
2522
2565
enforce_merge_checks, require_approvals_to_merge, delete,
2523
2566
require_all_dependencies_merged, push, require_passing_builds_to_merge,
@@ -2614,6 +2657,8 @@ def add_default_reviewer(self, workspace, repository_slug, user):
2614
2657
Add user as default reviewer to the repository.
2615
2658
Can safely be called multiple times with the same user, only adds once.
2616
2659
2660
+ :param workspace:
2661
+ :param repository_slug:
2617
2662
:param user: The username or account UUID to add as default_reviewer.
2618
2663
"""
2619
2664
return (
@@ -2653,6 +2698,8 @@ def is_default_reviewer(self, workspace, repository_slug, user):
2653
2698
"""
2654
2699
Check if the user is a default reviewer of the repository.
2655
2700
2701
+ :param workspace:
2702
+ :param repository_slug:
2656
2703
:param user: The username or account UUID to check.
2657
2704
:return: True if present, False if not.
2658
2705
"""
0 commit comments