Bitbucket - Can't create pull request with reviewers

I'm trying to create pull request in bitbucket via its API.

API description: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/pullrequests

This is an object I'm passing to the API

{
username : 'derbeerk',
repo_slug : 'lisatest',
title : 'title',
description : 'description',
source : { branch: { name: '1_package' }},
destination : { branch: { name: 'master' }},
reviewers : '{13e7e98b-414b-4345-9a63-5a59d76f8032}'
}

In return I get an errors like this

StatusCodeError: 500 - {"type":"error","error":{"message":"'list'","id":"0436de5105664825bb69a5e80c65614d"}}

 

I tried to change reviewers to username, uuid without curly braces, add trailing comma, etc.. always got the same error in return.

P.S. If I remove reviewers property - pull request would be created perfectly fine

 

1 answer

0 vote
Gonchik Tsymzhitov Community Champion Oct 05, 2017

Hi! 

 

have you tried to set 

reviewers   : '{13e7e98b-414b-4345-9a63-5a59d76f8032}'

like username

reviewers   : 'derbeerkManager'

@Gonchik Tsymzhitov I tried about 20 various combinations uuid with curly braces, without, username, team name, etc.. every time it replies with that kind of error 

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

2,034 views 1 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you