Bitbucket Server: How to turn off ability to delete pull request 5.1.x
Bitbucket Server 5.1.0 includes the feature to delete pull requests. This is enabled by default, and by default repository administrator can delete anyone else's pull request in that repository and pull request authors are allowed to delete own pull requests.
How to disable this feature, as well as change which permission is required to delete pull requests ?
This can be configured using <BITBUCKET-HOME>/shared/bitbucket.properties. See Bitbucket Properties
To disable this feature, set below in bitbucket.properties
To change which permission is required by default to delete the pull request set pullrequest.deletion.role
pullrequest.deletion.role=REPO_ADMIN # Valid values are: # - `AUTHOR` pull request authors and repository admins can delete pull requests # - `REPO_ADMIN` repository admins can delete pull requests
Above will prevent pull-request authors from deleting the pull requests and only repository administrators will be allowed to delete the pull requests.