Dear all,
I have a Jenkins job that does the build and in the post build actions, i have a script that runs the Curl command (shown below) where there is this $payload given for the '-d' option. This payload is a Json string that defines the details of the pull request and the reviewers list.
curl -X POST -H "Content-Type: application/json" -H 'X-Atlassian-Token: no-check' -u {username}:{password} https://server:port/rest/api/1.0/projects/{projectkey}/repos/{reponame}/pull-requests -d '{ "title": "Merge some branches", "description": "testing", "fromRef": { "id": "tag/branch" , "repository": { "slug":"reponame", "project": { "key": "projectkey" } } }, "toRef": { "id": "destination-branch" }, "reviewers": [ { "user": { "name": "username-who-has-access-rights"} } ], "close_source_branch": false }'This above command is able to create the pull request in the Bitbucket server repo, but is not able to set the reviewers, even though the "reviewers" are set in the Json and these users are valid users in Bitbucket for corresponding repository.
Please give guidance to setup this curl command to set the "default reviewers", which i do not now how to, and i do not need to specify this reviewers list in the curl command.
Many a thanks to all.
-vanchin