Skip to content

Commit 5f6e346

Browse files
author
Gonchik Tsymzhitov
committed
Confluence: new method of the inlinet tasks. Also Bitbucket support the filter of cloud version
1 parent 83fd288 commit 5f6e346

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

atlassian/bitbucket.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
class Bitbucket(AtlassianRestAPI):
1111
bulk_headers = {"Content-Type": "application/vnd.atl.bitbucket.bulk+json"}
1212

13+
def __init__(self, *args, **kwargs):
14+
super(Bitbucket, self).__init__(*args, **kwargs)
15+
url = kwargs.pop('url', False)
16+
if url and 'bitbucket.org' in url:
17+
self.cloud = True
18+
1319
def project_list(self, limit=None):
1420
"""
1521
Provide the project list

atlassian/request_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Additional log methods
77
def logger_has_handlers(logger):
88
"""Since Python 2 doesn't provide Logger.hasHandlers(), we have to
9-
perform the lookup by ourself."""
9+
perform the lookup by ourself. """
1010

1111
if PY3:
1212
return logger.hasHandlers()
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# coding=utf-8
2+
from atlassian import Bitbucket
3+
from pprint import pprint
4+
5+
bitbucket = Bitbucket(
6+
url='http://localhost:7990',
7+
username='admin',
8+
password='admin')
9+
10+
pprint(bitbucket.project_list())

0 commit comments

Comments
 (0)