You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I am using a curl PUT command to update the pull-request description. It is updating the description but removing the existing (already added) reviewers.
Following is the curl command I am using to update the pull-request description.
command:
curl -s -X PUT -u '<username>':'<password>' -H "Content-Type: application/json" -v -d '{"version": 1, "description": "'"should go together"'"}' https://<bitbucket.com>/rest/api/1.0/projects/<project_key>/repos/<repo_slug>/pull-requests/<pull_request_id>
Please help.
Hi @MOHAN SATYA SAI BHAVANI PRASAD. REDDY,
According to the REST API endpoint documentation, this is the expected behaviour and I just confirmed that this is the case in my test environment.
the reviewers list may be updated using this resource.
Since the payload accepts the list of reviewers as input, you could read the current ones and add them to the PUT request to update the description.
Cheers,
Caterina - Atlassian
Caterina,
The documentation says the "reviewers" list may be updated. It does not say it must be included. It sounds like there's a bug, either in the API endpoint (missing "reviewers" key in request should not remove all reviewers) or the documentation (may should be replaced with must).
What other keys must be included? Do I have to include every key that we aren't changing from the API? Or just the "reviewers" key? It seems like many things couldn't be changed this way ("createdDate", "updatedDate", "open", "closed", "state", "author", "links", etc.). So could we get a definitive list of which keys must be included (to keep from wiping the field) and which keys can't be included (here and in the documentation)? The documentation doesn't even say that the "version" key is required, but it is. It's very confusing and makes this endpoint very difficult to accurately use.
Thanks,
Nick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.