Unapproved a PR completely

mohan yadav
Contributor
May 31, 2024

There is a api endpoint which unapproved a PR https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pullrequests/#api-repositories-workspace-repo-slug-pullrequests-pull-request-id-approve-delete -  if the authenticated user approved the PR then only it unapproved the PR.

I want to unapproved a PR completely, for example, if there are 4 users who approved the PR . I need my authenticated should unapproved the PR completely (unapproved for all 4 users)

 

2 answers

0 votes
Illa shiza June 26, 2024

Hi Mohan,

You can only approve or unapprove pull requests as the authenticated user; it's not possible to do so on behalf of others. The alternative is to programmatically copy the source, destination branch, description, and summary, decline the existing PR, and create a new one.

 

0 votes
Ulrich Kuhnhardt _IzymesCo_
Atlassian Partner
June 3, 2024

Hi Mohan,

you can only approve/unapprove as the authenticated (logged in) user. Approving/Unapproving on behalf of other users is not possible. There is a similar request  and answer here. 

The next best option would be to (programmatically) copy source & dest branch, description and summary of the existing PR, decline it and then open a new PR.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events