Skip to content

Commit

Permalink
A new release with new Confluence methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Gonchik Tsymzhitov authored and Gonchik Tsymzhitov committed Jan 27, 2020
1 parent 610818b commit 642c3cb
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 12 deletions.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include atlassian/VERSION
include LICENSE
include README.rst
include tox.ini
include requirements.txt
2 changes: 1 addition & 1 deletion atlassian/VERSION
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
1.15.0
1.15.1

12 changes: 6 additions & 6 deletions atlassian/bitbucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -1474,12 +1474,12 @@ def set_branches_permissions(self, project_key, multiple_permissions=False, matc
except_access_keys = []
headers = self.default_headers
if repository:
url = "/rest/branch-permissions/2.0/projects/{project_key}/repos/{repository}/restrictions".format(
url = "rest/branch-permissions/2.0/projects/{project_key}/repos/{repository}/restrictions".format(
project_key=project_key,
repository=repository
)
else:
url = "/rest/branch-permissions/2.0/projects/{project_key}/restrictions".format(
url = "rest/branch-permissions/2.0/projects/{project_key}/restrictions".format(
project_key=project_key
)
if multiple_permissions:
Expand Down Expand Up @@ -1516,13 +1516,13 @@ def delete_branch_permission(self, project_key, permission_id, repository=None):
"""

if repository:
url = "/rest/branch-permissions/2.0/projects/{project_key}/repos/{repository}/restrictions/{id}".format(
url = "rest/branch-permissions/2.0/projects/{project_key}/repos/{repository}/restrictions/{id}".format(
project_key=project_key,
repository=repository,
id=permission_id
)
else:
url = "/rest/branch-permissions/2.0/projects/{project_key}/restrictions/{id}".format(
url = "rest/branch-permissions/2.0/projects/{project_key}/restrictions/{id}".format(
project_key=project_key,
id=permission_id
)
Expand All @@ -1540,13 +1540,13 @@ def get_branch_permission(self, project_key, permission_id, repository=None):
"""

if repository:
url = "/rest/branch-permissions/2.0/projects/{project_key}/repos/{repository}/restrictions/{id}".format(
url = "rest/branch-permissions/2.0/projects/{project_key}/repos/{repository}/restrictions/{id}".format(
project_key=project_key,
repository=repository,
id=permission_id
)
else:
url = "/rest/branch-permissions/2.0/projects/{project_key}/restrictions/{id}".format(
url = "rest/branch-permissions/2.0/projects/{project_key}/restrictions/{id}".format(
project_key=project_key,
id=permission_id
)
Expand Down
15 changes: 12 additions & 3 deletions atlassian/confluence.py
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ def is_page_content_is_already_updated(self, page_id, body, title=None):
log.debug('Old Content: """{body}"""'.format(body=confluence_body_content))
log.debug('New Content: """{body}"""'.format(body=body))

if confluence_body_content == body:
if confluence_body_content.strip() == body.strip():
log.warning('Content of {page_id} is exactly the same'.format(page_id=page_id))
return True
else:
Expand Down Expand Up @@ -1040,8 +1040,10 @@ def get_space(self, space_key, expand='description.plain,homepage'):
:param expand: OPTIONAL: additional info from description, homepage
:return: Returns the space along with its ID
"""
url = 'rest/api/space/{space_key}?expand={expand}'.format(space_key=space_key,
expand=expand)
url = 'rest/api/space/{space_key}'.format(space_key=space_key)
params = {}
if expand:
params["expand"] = expand
return self.get(url)

def create_space(self, space_key, space_name):
Expand All @@ -1066,6 +1068,13 @@ def delete_space(self, space_key):
url = 'rest/api/space/{}'.format(space_key)
return self.delete(url)

def get_space_property(self, space_key, expand=None):
url = 'rest/api/space/{space}/property'.format(space=space_key)
params = {}
if expand:
params['expand'] = expand
return self.get(url, params=params)

def get_user_details_by_username(self, username, expand=None):
"""
Get information about a user through username
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# The short X.Y version
version = ''
# The full version, including alpha/beta/rc tags
release = '1.13.23'
release = '1.15.01'

# -- General configuration ---------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion examples/stash-clean-jira-branches.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from atlassian import Jira
from atlassian import Stash
from var import config
import config
import logging
import time

Expand Down

0 comments on commit 642c3cb

Please sign in to comment.