Можно ли удалить пулреквест на BitBucket?
Я не могу найти возможность удалить PR на BitBucket. Я что-то упускаю или это действительно невозможно?
2 ответа
Согласно упомянутой ссылке jonrsharpe, справа от кнопки слияния есть 3 точки. В этом меню у вас должна быть опция удаления, если у вас есть разрешение на удаление.
Это доступно только для BitBucket Server, но не на BitBucket.org. В BitBucket.org нет возможности удалить PR.

Для Bitbucket Cloud это невозможно. Один из способов обойтись — создать ветку dev / junk, используемую для отклоненных или бесполезных запросов на вытягивание. Затем просто отредактируйте существующий запрос, чтобы перейти в эту ветку и выполнить слияние. Данные все еще есть, на случай, если они когда-нибудь понадобятся, или если это конфиденциальная информация, вы можете удалить всю ветку. Если он уже снижался раньше, что ж, ничего нельзя сделать, кроме как воссоздать это репо.
Deleting a Pull Request in Bitbucket: A Step-by-Step Guide
Presently, it is not feasible to erase pull requests via the user interface. However, we will solely eliminate pull requests that have confidential details such as passwords or other credentials. As a workaround, to remove a pull request from the recent activities feed, one can undertake fresh activities that will push it down the list.
Is it possible to delete a pull-request on BitBucket?
Solution 1:
It is possible to reject a pull request that achieves the same outcome, i.e., preventing or deleting the PR.
Solution 2:
According to the reference shared by jonrsharpe, on the merge button's right side, there are three dots that lead to a menu. If you possess the authority to delete, you'll find a delete choice in that menu.
The PR deletion feature is exclusively offered on BitBucket Server, and not available on BitBucket.org.

Solution 3:
There is no method available for achieving this in Bitbucket Cloud. However, a possible solution is to create a 'dev/junk' branch that can be utilized for rejected or unimportant pull requests. Afterward, modify the current request to merge into this branch. In case the information is required in the future, it will still be accessible. Alternatively, if the data is confidential, the entire branch can be removed. Unfortunately, if the request was previously declined, the only option is to recreate the repository.
Is it possible to delete a pull-request on BitBucket?
I cannot find an option to delete a PR on BitBucket. Am I overlooking something or it’s really not possible?
5 Answers 5
You can decline a pull request which has the same result — stopping / removing the PR.
As per the link jonrsharpe mentioned, to the right of the merge button there are 3 dots. Under that menu you should have a delete option if you have permission to delete.
This is available only for BitBucket Server, not on BitBucket.org. In BitBucket.org there is no option to delete the PR.

For Bitbucket Cloud, there are no way to do this. One way of getting by is to have a ‘dev/junk’ branch, used for declined or useless pull requests. Then just edit the existing request to go into this branch and merge. Data is still there, in case you need it some day, or if it’s sensitive info you can remove the whole branch. If its already declined before, well, nothing can be done then other than recreating that repo
How to undo a merge on Bitbucket?
You need to first clone the repository on your local system (you can get the repo URL in SSH or HTTPS format from the «Overview» page of the repository in Bitbucket):
.. then revert the most recent commit. First list the available commits with:
.. then select the commit before the merge:
.. where the hash is the hash of the commit before the merge (from the log). Finally, force-push the changes back to Bitbucket, overwriting history.
Naturally if the repo is shared, and its other users have pulled your most recent commit and built atop it, they won’t be happy. So in that case be sure to notify everybody of what you’re doing.
revert , as mentioned in the other answers is another option; it keeps the commit you made, but modifies the repository further (with a new commit) in such way that it undoes the changes you made. Whether you want to use revert depends on whether you want the information in your commit to remain in the repo history or not.
For more detail on undoing changes in git, see a good tutorial page by Atlassian.
I would suggest doing a revert instead, since you are reverting a public repo.