2

I am looking to send pull request to multiple reviewers in bitbucket. Currently I have json and curl request as below

{
    "title": "PR-Test",
    "source": {
        "branch": {
            "name": "master"
        }
    },
    "destination": {
        "branch": {
            "name": "prd"
        }
    },

    "reviewers": [
        {

            "uuid": "{d543251-6455-4113-b4e4-2fbb1tb260}"
        }

    ],

    "close_source_branch": true

}

curl -u "user:pass" -H "Content-Type: application/json" https://api.bitbucket.org/2.0/repositories/companyname/my-repo/pullrequests -X POST --data @my-pr.json

The above curl command works. I need the json syntax to pass either multiple usernames or multiple UUID in the reviewers list.

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

1
  • 1
    Reviewers can be specified by adding an array of user objects as the reviewers property. Commented Jun 4, 2019 at 8:24

1 Answer 1

1

The documentation you linked to seems to indicate that something like this should work:

"reviewers": [
    {
        "uuid": "{504c3b62-8120-4f0c-a7bc-87800b9d6f70}"
    },
    {
        "uuid": "{bafabef7-b740-4ee0-9767-658b3253ecc0}"
    }
]
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.