Skip to content

Commit c0f8672

Browse files
author
Gonchik Tsymzhitov
committed
Bump version and add parameters into docstring
1 parent 3f09ebc commit c0f8672

File tree

6 files changed

+63
-7
lines changed

6 files changed

+63
-7
lines changed

atlassian/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.3.0
1+
2.4.0

atlassian/bitbucket/__init__.py

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,8 @@ def set_project_avatar(self, key, icon, content_type="image/png"):
355355
def project_keys(self, key, start=0, limit=None, filter_str=None):
356356
"""
357357
Get SSH access keys added to the project
358+
:param start:
359+
:param limit:
358360
:param key: The project key
359361
:param filter_str: OPTIONAL: users filter string
360362
:return: The list of SSH access keys
@@ -437,6 +439,9 @@ def _url_project_groups(self, project_key):
437439
def project_groups(self, key, start=0, limit=None, filter_str=None):
438440
"""
439441
Get Project Groups
442+
:param limit:
443+
:param limit:
444+
:param start:
440445
:param key: The project key
441446
:param filter_str: OPTIONAL: group filter string
442447
:return:
@@ -574,8 +579,10 @@ def _url_repos(self, project_key, api_root=None, api_version=None):
574579
def repo_list(self, project_key, start=0, limit=25):
575580
"""
576581
Get repositories list from project
577-
:param project_key: The project key
578582
583+
:param project_key: The project key
584+
:param start:
585+
:param limit:
579586
:return:
580587
"""
581588
url = self._url_repos(project_key)
@@ -605,7 +612,6 @@ def create_repo(self, project_key, repository_slug, forkable=False, is_private=T
605612
:param project_key: The project matching the projectKey supplied in the resource path as shown in URL.
606613
:type project_key: str
607614
:param repository_slug: Name of repository to create (i.e. "My repo").
608-
:type repository: str
609615
:param forkable: Set the repository to be forkable or not.
610616
:type forkable: bool
611617
: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):
715721
def repo_keys(self, project_key, repo_key, start=0, limit=None, filter_str=None):
716722
"""
717723
Get SSH access keys added to the repository
724+
:param start:
725+
:param limit:
718726
:param project_key: The project key
719727
:param repo_key: The repository key
720728
:param filter_str: OPTIONAL: users filter string
@@ -736,6 +744,8 @@ def _url_repo_users(self, project_key, repo):
736744
def repo_users(self, project_key, repo_key, start=0, limit=None, filter_str=None):
737745
"""
738746
Get users who has permission in repository
747+
:param start:
748+
:param limit:
739749
:param project_key: The project key
740750
:param repo_key: The repository key
741751
:param filter_str: OPTIONAL: Users filter string
@@ -786,6 +796,8 @@ def _url_repo_groups(self, project_key, repo):
786796
def repo_groups(self, project_key, repo_key, start=0, limit=None, filter_str=None):
787797
"""
788798
Get repository Groups
799+
:param start:
800+
:param limit:
789801
:param project_key: The project key
790802
:param repo_key: The repository key
791803
:param filter_str: OPTIONAL: group filter string
@@ -957,7 +969,6 @@ def create_branch(self, project_key, repository_slug, name, start_point, message
957969
:param project_key: The project matching the projectKey supplied in the resource path as shown in URL.
958970
:type project_key: str
959971
:param repository_slug: Name of repository where branch is created (i.e. "my_repo").
960-
:type repository: str
961972
:param name: Name of branch to create (i.e. "my_branch").
962973
:type name: str
963974
: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
12581269
def get_pull_requests_activities(self, project_key, repository_slug, pull_request_id, start=0, limit=None):
12591270
"""
12601271
Get pull requests activities
1272+
:param limit:
12611273
:param project_key:
12621274
:param repository_slug:
12631275
: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
12751287
def get_pull_requests_changes(self, project_key, repository_slug, pull_request_id, start=0, limit=None):
12761288
"""
12771289
Get pull requests changes
1290+
:param start:
1291+
:param limit:
12781292
:param project_key:
12791293
:param repository_slug:
12801294
: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
12911305
def get_pull_requests_commits(self, project_key, repository_slug, pull_request_id, start=0, limit=None):
12921306
"""
12931307
Get pull requests commits
1308+
:param start:
1309+
:param limit:
12941310
:param project_key:
12951311
:param repository_slug:
12961312
: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
13121328
def get_pull_requests_participants(self, project_key, repository_slug, pull_request_id, start=0, limit=None):
13131329
"""
13141330
Get all participants of a pull request
1331+
:param start:
1332+
:param limit:
13151333
:param project_key:
13161334
:param repository_slug:
13171335
:param pull_request_id:
@@ -1668,6 +1686,7 @@ def get_commits(
16681686
def get_changelog(self, project_key, repository_slug, ref_from, ref_to, start=0, limit=None):
16691687
"""
16701688
Get change log between 2 refs
1689+
:param start:
16711690
:param project_key:
16721691
:param repository_slug:
16731692
:param ref_from:
@@ -1780,6 +1799,7 @@ def get_file_list(self, project_key, repository_slug, query=None, start=0, limit
17801799
Retrieve a page of files from particular directory of a repository.
17811800
The search is done recursively, so all files from any sub-directory of the specified directory will be returned.
17821801
The authenticated user must have REPO_READ permission for the specified repository to call this resource.
1802+
:param start:
17831803
:param project_key:
17841804
:param repository_slug:
17851805
: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):
22412261
"""
22422262
Get all repositories in a workspace.
22432263
2264+
:param workspace:
22442265
:param role: Filters the result based on the authenticated user's role on each repository.
22452266
One of: member, contributor, admin, owner
22462267
: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
22612282
"""
22622283
Get information about latest pipelines runs.
22632284
2285+
:param workspace:
2286+
:param repository_slug:
2287+
:param sort_by:
22642288
:param number: number of pipelines to fetch
22652289
:param :sort_by: optional key to sort available pipelines for
22662290
:return: List of pipeline data
@@ -2307,6 +2331,8 @@ def trigger_pipeline(self, workspace, repository_slug, branch="master", revision
23072331
def get_pipeline(self, workspace, repository_slug, uuid):
23082332
"""
23092333
Get information about the pipeline specified by ``uuid``.
2334+
:param workspace:
2335+
:param repository_slug:
23102336
:param uuid: Pipeline identifier (with surrounding {}; NOT the build number)
23112337
"""
23122338
return (
@@ -2324,6 +2350,8 @@ def get_pipeline(self, workspace, repository_slug, uuid):
23242350
def stop_pipeline(self, workspace, repository_slug, uuid):
23252351
"""
23262352
Stop the pipeline specified by ``uuid``.
2353+
:param workspace:
2354+
:param repository_slug:
23272355
:param uuid: Pipeline identifier (with surrounding {}; NOT the build number)
23282356
23292357
See the documentation for the meaning of response status codes.
@@ -2343,6 +2371,8 @@ def stop_pipeline(self, workspace, repository_slug, uuid):
23432371
def get_pipeline_steps(self, workspace, repository_slug, uuid):
23442372
"""
23452373
Get information about the steps of the pipeline specified by ``uuid``.
2374+
:param workspace:
2375+
:param repository_slug:
23462376
:param uuid: Pipeline identifier (with surrounding {}; NOT the build number)
23472377
"""
23482378
values = []
@@ -2364,6 +2394,8 @@ def get_pipeline_steps(self, workspace, repository_slug, uuid):
23642394
def get_pipeline_step(self, workspace, repository_slug, pipeline_uuid, step_uuid):
23652395
"""
23662396
Get information about a step of a pipeline, specified by respective UUIDs.
2397+
:param workspace:
2398+
:param repository_slug:
23672399
:param pipeline_uuid: Pipeline identifier (with surrounding {}; NOT the build number)
23682400
:param step_uuid: Step identifier (with surrounding {})
23692401
"""
@@ -2383,6 +2415,8 @@ def get_pipeline_step(self, workspace, repository_slug, pipeline_uuid, step_uuid
23832415
def get_pipeline_step_log(self, workspace, repository_slug, pipeline_uuid, step_uuid):
23842416
"""
23852417
Get log of a step of a pipeline, specified by respective UUIDs.
2418+
:param workspace:
2419+
:param repository_slug:
23862420
:param pipeline_uuid: Pipeline identifier (with surrounding {}; NOT the build number)
23872421
:param step_uuid: Step identifier (with surrounding {})
23882422
:return: byte string log
@@ -2411,6 +2445,10 @@ def create_issue(
24112445
):
24122446
"""
24132447
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:
24142452
:param kind: one of: bug, enhancement, proposal, task
24152453
:param priority: one of: trivial, minor, major, critical, blocker
24162454
"""
@@ -2430,6 +2468,8 @@ def get_issues(self, workspace, repository_slug, sort_by=None, query=None):
24302468
"""
24312469
Get information about the issues tracked in the given repository. By
24322470
default, the issues are sorted by ID in descending order.
2471+
:param workspace:
2472+
:param repository_slug:
24332473
:param sort_by: optional key to sort available issues for
24342474
:param query: optional query to filter available issues for. See
24352475
https://developer.atlassian.com/bitbucket/api/2/reference/meta/filtering
@@ -2518,6 +2558,9 @@ def add_branch_restriction(
25182558
"""
25192559
Add a new branch restriction.
25202560
2561+
:param workspace:
2562+
:param repository_slug:
2563+
:param value:
25212564
:param kind: One of require_tasks_to_be_completed, force, restrict_merges,
25222565
enforce_merge_checks, require_approvals_to_merge, delete,
25232566
require_all_dependencies_merged, push, require_passing_builds_to_merge,
@@ -2614,6 +2657,8 @@ def add_default_reviewer(self, workspace, repository_slug, user):
26142657
Add user as default reviewer to the repository.
26152658
Can safely be called multiple times with the same user, only adds once.
26162659
2660+
:param workspace:
2661+
:param repository_slug:
26172662
:param user: The username or account UUID to add as default_reviewer.
26182663
"""
26192664
return (
@@ -2653,6 +2698,8 @@ def is_default_reviewer(self, workspace, repository_slug, user):
26532698
"""
26542699
Check if the user is a default reviewer of the repository.
26552700
2701+
:param workspace:
2702+
:param repository_slug:
26562703
:param user: The username or account UUID to check.
26572704
:return: True if present, False if not.
26582705
"""

atlassian/bitbucket/cloud/repositories/branchRestrictions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def create(
2525
"""
2626
Add a new branch restriction.
2727
28+
:param value:
2829
:param kind: string: One of require_tasks_to_be_completed, force, restrict_merges,
2930
enforce_merge_checks, require_approvals_to_merge, delete,
3031
require_all_dependencies_merged, push, require_passing_builds_to_merge,

atlassian/confluence.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1547,6 +1547,7 @@ def update_page_property(self, page_id, data):
15471547
"""
15481548
Update the page (content) property.
15491549
Use json data or independent keys
1550+
:param data:
15501551
:param page_id: content_id format
15511552
:data: property data in json format
15521553
:return:
@@ -1772,6 +1773,7 @@ def get_space_content(
17721773
Get space content.
17731774
You can specify which type of content want to recieve, or get all content types.
17741775
Use expand to get specific content properties or page
1776+
:param content_type:
17751777
:param space_key: The unique space key name
17761778
:param depth: OPTIONAL: all|root
17771779
Gets all space pages or only root pages

atlassian/jira.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1196,6 +1196,8 @@ def is_active_user(self, username):
11961196
def user_remove(self, username=None, account_id=None, key=None):
11971197
"""
11981198
Remove user from Jira if this user does not have any activity
1199+
:param key:
1200+
:param account_id:
11991201
:param username:
12001202
:return:
12011203
"""
@@ -2205,6 +2207,7 @@ def get_workflows_paginated(self, startAt=None, maxResults=None, workflowName=No
22052207
"""
22062208
Provide all workflows paginated (see https://developer.atlassian.com/cloud/jira/platform/rest/v2/\
22072209
api-group-workflows/#api-rest-api-2-workflow-search-get)
2210+
:param expand:
22082211
:param startAt: OPTIONAL The index of the first item to return in a page of results (page offset).
22092212
:param maxResults: OPTIONAL The maximum number of items to return per page.
22102213
:param workflowName: OPTIONAL The name of a workflow to return.
@@ -2373,7 +2376,6 @@ def get_project_issue_security_scheme(self, project_id_or_key, only_levels=False
23732376
:return: list
23742377
"""
23752378
url = "rest/api/2/project/{}/issuesecuritylevelscheme".format(project_id_or_key)
2376-
response = None
23772379
try:
23782380
response = self.get(url)
23792381
except HTTPError as e:

atlassian/service_desk.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,7 @@ def add_users_to_organization(self, organization_id, users_list=[], account_list
383383
users_list is a list of strings
384384
account_list is a list of accountIds
385385
386+
:param account_list:
386387
:param organization_id: str
387388
:param users_list: list
388389
:return:
@@ -609,8 +610,10 @@ def get_customers(self, service_desk_id, query=None, start=0, limit=50):
609610
For example, searching for "John", "Jo", "Smi", or "Smith" will match a
610611
user with display name "John Smith"..
611612
613+
:param query:
614+
:param start:
615+
:param limit:
612616
:param service_desk_id: str
613-
:param list_of_usernames: list
614617
:return: the customers added to the service desk
615618
"""
616619
url = "rest/servicedeskapi/servicedesk/{}/customer".format(service_desk_id)
@@ -739,10 +742,11 @@ def create_request_type(
739742
):
740743
"""
741744
Creating a request type
745+
:param request_type_id:
746+
:param request_help_text:
742747
:param service_desk_id: str
743748
:param request_name: str
744749
:param request_description: str
745-
:param request_help_test: str
746750
"""
747751
log.warning("Creating request type...")
748752
data = {

0 commit comments

Comments
 (0)