How to turn off the ability to delete pull requests in Bitbucket Data Center

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

要約

Bitbucket Data Center and Server versions 5.1.0 and later provide the ability to delete pull requests. This feature is enabled by default 

Users who can delete pull requests

By default, the following users can delete pull requests:

  • Pull request authors - authors can delete their own pull requests
  • Repository administrators - repository admins can delete anyone else's pull request within the repository they have admin access to


In case you want to disable the feature to delete pull requests, or change which permission is required to delete pull requests, please follow the steps below:

ソリューション

The configuration settings listed below are set in the <BITBUCKET-HOME>/shared/bitbucket.properties file. See Bitbucket config properties for more information.

Disable the feature to delete pull requests

To disable the feature to delete pull requests, add the following property:

feature.pull.request.deletion=false 

Note that disabling this feature will prevent pull request deletion globally.

Change which permission is required to delete pull requests

To change which permission is required to delete the pull requests, set the following property:

# Determines which users can delete pull requests.
# Valid values are:
#     - `AUTHOR` pull request authors and repository admins can delete pull requests
#     - `REPO_ADMIN` repository admins can delete pull requests
pullrequest.deletion.role=REPO_ADMIN
  • If the property is set to AUTHOR, pull request authors and repository admins can delete pull requests. This is the default setting.
  • If the property is set to REPO_ADMIN, only repository admins can delete pull requests. Pull request authors will not be able to delete their pull requests.

    Note:
    Please make sure that users to whom you would like to restrict from deleting the pull requests, do not have admin or system admin permissions globally under the Administration → Global Permissions section otherwise they should be able to delete the pull request.
最終更新日 2024 年 6 月 26 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.