Skip to content

Add docs about properties #1218

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,7 @@ def each(self, pagelen=10):

API docs: https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pipelines/#api-repositories-workspace-repo-slug-deployments-config-environments-environment-uuid-variables-get
"""
params = {}
params["pagelen"] = pagelen
params = {"pagelen": pagelen}

response = super(BitbucketCloudBase, self).get(None, params=params)

Expand All @@ -190,7 +189,7 @@ def each(self, pagelen=10):

if pagelen_total < size_total:
pagelen_total = pagelen_total + response["pagelen"]
page = page + 1
page += 1
response = super(BitbucketCloudBase, self).get(None, params={"pagelen": pagelen, "page": page})
else:
break
Expand Down
13 changes: 10 additions & 3 deletions atlassian/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def set_property(self, property_id, value):

def get_advanced_settings(self):
"""
Returns the properties that are displayed on the "General Configuration > Advanced Settings" page
Returns the properties that are displayed on the "General Configuration > Advanced Settings" page.
:return:
"""
url = self.resource_url("application-properties/advanced-settings")
Expand Down Expand Up @@ -1077,15 +1077,22 @@ def issue_editmeta(self, key):
url = "{}/{}/editmeta".format(base_url, key)
return self.get(url)

def get_issue_changelog(self, issue_key):
def get_issue_changelog(self, issue_key, start=None, limit=None):
"""
Get issue related change log
:param issue_key:
:param start: start index, usually 0
:param limit: limit of the results, usually 50
:return:
"""
base_url = self.resource_url("issue")
url = "{base_url}/{issue_key}?expand=changelog".format(base_url=base_url, issue_key=issue_key)
return (self.get(url) or {}).get("changelog")
params = {}
if start:
params["startAt"] = start
if limit:
params["maxResults"] = limit
return (self.get(url) or {}).get("changelog", params)

def issue_add_json_worklog(self, key, worklog):
"""
Expand Down
25 changes: 25 additions & 0 deletions docs/jira.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,31 @@ Reindex Jira
If it's not possible (due to an inconsistent index), do a foreground reindexing.
"""

Manage Permissions
------------------

.. code-block:: python

# Get permissions
jira.permissions(permissions, project_id=None, project_key=None, issue_id=None, issue_key=None,)

# Get all permissions
jira.get_all_permissions()

Application properties
----------------------

.. code-block:: python

# Get an application property
jira.get_property(key=None, permission_level=None, key_filter=None)

# Set an application property
jira.set_property(property_id, value)

# Returns the properties that are displayed on the "General Configuration > Advanced Settings" page.
jira.get_advanced_settings()

Manage users
------------

Expand Down