Boost sales productivity
Boost sales productivity
Boost sales productivity
Deliver software faster
Deliver outstanding support
Transform the way you manage Jira projects
Resolve incidents faster
Bring magic to office celebrations in Slack
Manage pull requests in Slack
Bring employee leave management in Slack
Run planning poker sessions in Slack
Hold retrospective sessions in Slack
Run polls in Slack
Run standup meetings in Slack
Send and receive kudos in Slack
Bring ChatGPT AI Assistant to Slack
Discover how Actioner empowers teams across industries with streamlined workflows and task automation.
Stay updated with the latest insights
Explore step-by-step tutorials
Explore Actioner customers
Discover how Actioner stands out
Access a comprehensive knowledge base
A pull request is a feature in Bitbucket that allows developers to propose changes to a codebase. However, sometimes a pull request may no longer be needed or may have been submitted in error. In such cases, you may want to delete the pull request.
We have listed three ways to delete a Bitbucket pull request and explain each method's authorization levels and requirements:
Let's find out which method works best for you.
The first and easiest way to delete a pull request in Bitbucket is to use the web interface. Here are the steps involved:
1. Log in to Bitbucket and navigate to the repository that contains the pull request you want to delete.
2. Click on the "Pull Requests" tab to see a list of all the open pull requests for the repository.
3. Find the pull request you want to delete and click on it to open it.
4. Once the pull request is open, you should see a button on the top right-hand side that says "Decline." Click on this button.
5. A confirmation window will appear, asking you to confirm that you want to decline the pull request. Click on "Decline pull request" to confirm.
6. The pull request will be deleted. You won't see it in your list of pull requests anymore.
It is necessary for you to have at least "write" access to the repository to use this method. This means that you must be a member of a group or have been given explicit permission to modify the repository by the repository owner or an administrator.
Learn how to create a Bitbucket PR ➡️
The Bitbucket API allows developers to interact with Bitbucket programmatically. This method can be useful if you need to automate the process of deleting pull requests. Here are the steps involved:
Replace <your_access_token> with the access token you generated in step 2, <workspace> with the name of your Bitbucket workspace, <repo_slug> with the slug of the repository where the pull request is located, and <pull_request_id> with the ID of the pull request you want to delete. You can find the ID of the pull request in the URL of the pull request page.
To use this method, you must have a personal access token that has the "Pull Requests: Write" permission.
The third method to delete a pull request in Bitbucket is by using Git. Here are the steps involved:
To use this method, you must have “write” access to the repository and the ability to push changes to the remote repository. This means that you must be a member of a group or have been given explicit permission to modify the repository by the repository owner or an administrator.
Explore our Bitbucket pipelines and PR management apps for Slack
Explore top CI/CD tools for 2024! This blog provides insights on GitHub Actions, GitLab CI/CD, and more, helping DevOps pros optimize software development.