Skip to content

Commit

Permalink
Polish
Browse files Browse the repository at this point in the history
  • Loading branch information
gonchik committed Feb 8, 2023
1 parent 92bbc63 commit 302d9fc
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 14 deletions.
1 change: 0 additions & 1 deletion atlassian/bitbucket/cloud/repositories/refs.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ def create(
):
"""
Creates a ref with the given target commit
:param name: string: name
:param commit: string: commit hash
Expand Down
4 changes: 3 additions & 1 deletion atlassian/insight.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ def __cloud_init(self, *args, **kwargs):
return args, kwargs

def __get_workspace_id(self):
return self.get("rest/servicedeskapi/insight/workspace", headers=self.default_headers,)["values"][
return self.get(
"rest/servicedeskapi/insight/workspace",
headers=self.default_headers,)["values"][
0
]["workspaceId"]

Expand Down
6 changes: 6 additions & 0 deletions atlassian/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -2124,6 +2124,12 @@ def archive_project(self, key):
return self.put(url)

def project(self, key, expand=None):
"""
Get project with details
:param key:
:param expand:
:return:
"""
params = {}
if expand:
params["expand"] = expand
Expand Down
3 changes: 0 additions & 3 deletions atlassian/xray.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@

class Xray(AtlassianRestAPI):
def __init__(self, *args, **kwargs):

if "api_version" not in kwargs:
kwargs["api_version"] = "1.0"

kwargs["api_root"] = "rest/raven"

super(Xray, self).__init__(*args, **kwargs)

def resource_url(self, resource, api_root=None, api_version=None):
Expand Down
5 changes: 4 additions & 1 deletion docs/jira.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ Manage projects
jira.archive_project(key)
# Get project
jira.project(key)
jira.project(key, expand=None)
# Get project info
jira.get_project(key, expand=None)
# Get project components using project key
jira.get_project_components(key)
Expand Down
1 change: 0 additions & 1 deletion examples/confluence/confluence_copy_labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ def sync_labels_pages(pages, destination_space):


if __name__ == "__main__":

# Setting the logging level. INFO|ERROR|DEBUG are the most common.
logging.basicConfig(level=logging.INFO)
# Initialize argparse module with some program name and additional information
Expand Down
7 changes: 0 additions & 7 deletions examples/jira/jira_dc_create_support_zips.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,16 @@
in_progress_zips = list()

while True:

for task in jira.check_support_zip_status(zips_creation_task_id)["tasks"]:

if task["status"] == "IN_PROGRESS":
print("file {} {}".format(task["fileName"], task["progressMessage"]))

if task["fileName"] not in in_progress_zips:
in_progress_zips.append(task["fileName"])

else:
support_zip = jira.download_support_zip(task["fileName"])

with open(task["fileName"], "wb") as fp:
fp.write(support_zip)

print("{} written.".format(task["fileName"]))

if task["fileName"] in in_progress_zips:
in_progress_zips.remove(task["fileName"])

Expand Down

0 comments on commit 302d9fc

Please sign in to comment.