Details
-
Suggestion
-
Resolution: Unresolved
-
None
Description
If a user try to decline a PR whose source branch is deleted, the process just hangs. As a workaround users will have to use API or reach out to support to get the PR declined. Raising this request to allow users to decline such PRs from the UI instead of reaching out to support for help.
Workaround:
API to decline such PR
https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/decline
An example API call using CURL would be:
curl --request POST \ --url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/decline' \ --header 'Authorization: Bearer <access_token>' \ --header 'Accept: application/json'
Reference - Decline a pull request (API documentation)