Skip to content

Commit f3d7f2a

Browse files
author
Dmitrij Djachkov
authored
Bitbucket little change + exmpl (#582)
* Confluence: add another method for getting space pages + exmpl + doc * Bamboo: get_plan: add expand parameter * Bitbucket: add adv_mode support for method; add example
1 parent fb2a4e2 commit f3d7f2a

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

atlassian/bitbucket.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -859,6 +859,8 @@ def get_pull_requests_changes(self, project, repository, pull_request_id):
859859
pullRequestId=pull_request_id)
860860
params = {'start': 0}
861861
response = self.get(url, params=params)
862+
if self.advanced_mode:
863+
return response
862864
if 'values' not in response:
863865
return []
864866
changes_list = (response or {}).get('values')
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
from atlassian import Bitbucket
2+
3+
4+
url = 'http://localhost:7990'
5+
username = "admin"
6+
password = "admin"
7+
8+
proj = "PROJ"
9+
repo = "test-repo"
10+
pr_id = 123
11+
12+
bitbucket = Bitbucket(
13+
url=url,
14+
username=username,
15+
password=password,
16+
advanced_mode=True)
17+
18+
diff = bitbucket.get_pull_requests_changes(proj, repo, pr_id).json()
19+
for item in diff.get("values", []):
20+
print(item.get("path", {}).get("toString"))

0 commit comments

Comments
 (0)