# Ensure open tasks are resolved before merging on the default branch

- Source: https://support.icompaas.com/support/solutions/articles/a_1789072806423496-ensure-open-tasks-are-resolved-before-merging-on-the-default-branch
- Section: [Solutions](https://support.icompaas.com/support/solutions) › [Version Control System (VCS)](https://support.icompaas.com/support/solutions/c_1781179095087930) › [Bitbucket](https://support.icompaas.com/support/solutions/folders/f_1781179159125832)
- Last updated: 2026-10-26
- Publisher: iCompaas, Inc. (https://www.icompaas.com)

Description

This check verifies that open pull request tasks must be resolved before changes can be merged into the default branch of a Bitbucket repository. Requiring task resolution ensures that review comments, identified issues, and required follow-up actions are addressed before code changes are accepted. This control helps enforce a complete pull request review process by preventing merges while unresolved tasks remain open.

Note: Only repository-level branch restrictions are detected. Restrictions set only at the project level are not returned by Bitbucket’s API and will result in a FAIL. Configure the restriction at the repository level for accurate results.

Rationale

The default branch typically contains stable or production-ready code. Allowing pull requests to merge with unresolved tasks may result in incomplete reviews, ignored reviewer feedback, or known issues being introduced into the codebase. Requiring all pull request tasks to be completed before merging ensures that reviewer concerns are addressed, improves code quality, and helps maintain the integrity of the default branch.

Impact

-   Prevent pull requests from being merged until all review tasks are completed.
    
-   Ensure reviewer feedback and identified issues are addressed before code changes are accepted.
    
-   Improve code quality by enforcing completion of required review activities.
    
-   Increase the time required to merge changes when unresolved tasks remain.
    
-   Strengthen the overall pull request governance process.
    

Default Value

Depends on repository configuration. Bitbucket repositories do not automatically require pull request tasks to be completed before merging. Repository administrators must manually configure branch restrictions and merge checks to enforce this requirement.

Pre-Requisites

-   Repository administrator access
    
-   An existing Bitbucket repository
    

Test Plan

1.  Sign in to Bitbucket at [https://bitbucket.org](https://bitbucket.org/).
    
2.  Navigate to the target repository.
    
3.  Select Repository settings.
    
4.  Under the Workflow section, select Branch restrictions.
    
5.  Review the branch restriction rules configured for the default branch.
    
6.  Verify that the default branch requires all pull request tasks to be completed before merging.
    
7.  If the requirement is not enabled for the default branch, follow the implementation steps.
    

Implementation Steps

1.  Sign in to Bitbucket at [https://bitbucket.org](https://bitbucket.org/).
    
2.  Navigate to the target repository.
    
3.  Select Repository settings.
    

4.  Under the Workflow section, select Branch restrictions.
    

5.  Select the branch restriction rule configured for the default branch.
    
6.  Open the Merge settings configuration.
    

7.  Enable the option requiring all pull request tasks to be completed before merging.
    

8.  Review and configure additional merge requirements based on organizational requirements.
    
9.  Save the changes.
    

Backout Plan

1.  Sign in to Bitbucket at [https://bitbucket.org](https://bitbucket.org/).
    
2.  Navigate to the target repository.
    
3.  Select Repository settings.
    
4.  Under the Workflow section, select Branch restrictions.
    
5.  Locate the branch restriction rule configured for requiring task resolution before merging.
    
6.  Disable the requirement for completing pull request tasks before merging.
    

7.  Save the changes.
    
8.  Confirm that repository pull request workflows function as expected after the rollback.
    

Reference

-   [https://support.atlassian.com/bitbucket-cloud/docs/use-branch-permissions/](https://support.atlassian.com/bitbucket-cloud/docs/use-branch-permissions/)
    
-   [https://support.atlassian.com/bitbucket-cloud/docs/work-with-pull-requests/](https://support.atlassian.com/bitbucket-cloud/docs/work-with-pull-requests/)

## Related compliance guidance

- [SOC 2 compliance: a practical implementation guide for cloud-native SaaS teams](https://support.icompaas.com/compliance/soc-2-trust-services-criteria): Configuration checks like this one are the technical half of a SOC 2 / ISO 27001 programme — the guide shows where they fit, what else an auditor expects, and how to evidence them.
- [ISO/IEC 27001:2022 compliance: a practical implementation guide](https://support.icompaas.com/compliance/iso-27001-2022): ISO 27001 Annex A.8 (technological controls) is where cloud hardening evidence lands; the guide shows how to run the ISMS around it.
