Automatically decline inactive pull requests

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

Bitbucket Data Center and Server can automatically decline pull requests that are inactive, reducing the number of pull requests in the list that can add up. For example, if an older pull request has not had any activity (like commits, comments or approvals) in a set amount of time, it will be declined. By default, the option is on and set to 4 weeks. This period of inactivity can be overwritten for projects and repositories.

On this page:

Automatically decline inactive pull requests for all repositories in a project

To configure the automatic declining of inactive pull requests in a project:

  1. Select Project settings > Auto-decline.

  2. Select the Auto-decline pull requests check-box to enable it.

  3. Set the amount of time before a pull request will be automatically declined from 1, 2, 4, 8, or 12 weeks.

  4. Select Save.

Automatically decline inactive pull requests for a repository

Configuring this setting at the repository level, will override the setting for it at the project level.

To configure the automatic declining of inactive pull requests in a single repository:

  1. Select Repository settings > Auto-decline.

    1. By default, settings are inherited from the project settings.

  2. Select Use custom settings.

  3. Select the Auto-decline pull requests check-box to enable it.

  4. Set the amount of time before a pull request will be automatically declined from 1, 2, 4, 8, or 12 weeks.

  5. Select Save.

Once the configuration is saved, inactive pull requests will become declined by the Bitbucket system user. This will add a comment indicating that the reason for the decline is due to inactivity.

Modify the global default

You can control the global default behavior for the auto-decline pull requests setting with the following properties: 

  • pullrequest.auto.decline.settings.global.enabled - controls whether or not auto-decline setting is enabled by default for all repositories.
  • pullrequest.auto.decline.settings.global.inactivityWeeks - sets the global default inactivity period. 

For a complete list of properties that can be used to control behavior in Bitbucket, see Configuration properties.

Last modified on Oct 27, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.