Skip to content

Commit 5e082e8

Browse files
Dmitriy DiachkovDmitriy Diachkov
authored andcommitted
Switch from strings to params
1 parent d049491 commit 5e082e8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

atlassian/bamboo.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -366,10 +366,10 @@ def create_branch(self, plan_key, branch_name, vcs_branch=None, enabled=False, c
366366
"""
367367
resource = 'plan/{plan_key}/branch/{branch_name}'.format(plan_key=plan_key, branch_name=branch_name)
368368
if vcs_branch:
369-
resource += '?vcsBranch{vcs_branch}'.format(vcs_branch=vcs_branch)
370-
resource += '&enabled={}'.format('true' if enabled else 'false')
371-
resource += '&cleanupEnabled={}'.format('true' if cleanup_enabled else 'false')
372-
return self.put(self.resource_url(resource))
369+
params = {'vcsBranch':vcs_branch}
370+
params['enabled'] = 'true' if enabled else 'false'
371+
params['cleanupEnabled'] = 'true' if cleanup_enabled else 'false'
372+
return self.put(self.resource_url(resource), params=params)
373373

374374
def enable_plan(self, plan_key):
375375
"""

0 commit comments

Comments
 (0)