Details
-
Bug
-
Resolution: Handled by Support
-
Medium
Description
I'm using Python to create a Pull Request against a repository. The api endpoint works well when I don't include the block for reviewers but if I set reviewers, I get a:
400 Client Error: Bad Request for url https://api.bitbucket.org/2.0/repositories/***/***/pullrequests
Here's the sample code:
import requests from requests.exceptions import HTTPError try: data = { 'title': 'My Title', 'description': 'My Description', 'close_source_branch': True, 'source': { 'branch': {'name': 'my-branch'} }, 'reviewers': [ {'uuid': '{...}'}, {'uuid': '{...}'} ] } r = requests.post('https://api.bitbucket.org/2.0/repositories/***/***/pullrequests', auth=('username', 'password'), json=data) r.raise_for_status() print('>> setup is done.', r.json()) except HTTPError as e: print('!> setup for is not done.', e)