Skip to content

Commit a3d9fcf

Browse files
authored
Merge pull request atlassian-api#314 from RichardWilder/Fix_Bitbucket_project
Fix Bitbucket.project()
2 parents d97aed8 + c8fc8a4 commit a3d9fcf

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

atlassian/bitbucket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def project(self, key):
2424
:return:
2525
"""
2626
url = 'rest/api/1.0/projects/{0}'.format(key)
27-
return (self.get(url) or {}).get('values')
27+
return (self.get(url) or {})
2828

2929
def create_project(self, key, name, description=""):
3030
"""

examples/bitbucket-project.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@
33

44

55
def html(project):
6-
html_data = """<tr>
7-
<td>{project_key}</td>
8-
<td>{project_name}</td>
9-
<td><ul>""".format(**project)
10-
for user in project['project_administrators']:
11-
html_data += '\n\t<li><a href="mailto:{email}">{name}</a></li>'.format(**user)
12-
return html_data + '</ul></td></tr>\n'
13-
6+
html_data = '<table>\n'
7+
html_data += '\t<tr><th>ITEM</th><th>VALUE</th></tr>\n'
8+
html_data += '\t<tr><td>key</td><td>{key}</td></tr>\n'.format(**project)
9+
html_data += '\t<tr><td>name</td><td>{name}</td></tr>\n'.format(**project)
10+
html_data += '\t<tr><td>description</td><td>{description}</td></tr>\n'.format(**project)
11+
html_data += '\t<tr><td>id</td><td>{id}</td></tr>\n'.format(**project)
12+
return html_data + '</table>\n'
1413

1514
bitbucket = Bitbucket(
1615
url='http://localhost:7990',

0 commit comments

Comments
 (0)