Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-20970

The merge check "Atleast 1 successful build and no failed builds" is checking for all the builds on the source branch

XMLWordPrintable

      Issue Summary

      The merge check "Atleast 1 successful build and no failed builds" is checking for all the builds on the source branch.

      If there are two PRs with the same source branch and different destination branch, and if the build fails for one of the PR, the merge check on the other PR prevents merging the PR even though the build for this PR is successful.

      Steps to Reproduce

      1. Create a 'develop' branch.
      2. Configured pipelines YAML to run on pull requests on develop branch.
      3. Create the 'release/v0.1' from develop branch.
      4. Added a new commit to the 'develop' branch.
      5. Created the 'release/v0.2' branch from 'release/v0.1' branch
      6. Added a new commit on ''release/v0.2'' branch on the same line as above commit on 'develop'
      7. Create a pull request PR-1 to merge branch 'release/v0.2' to 'release/v0.1'. The pipelines build will be successful.
      8. Create a pull request PR-2 to merge branch 'release/v0.2' to 'develop'. This PR will have a merge conflict as per the commits based step 4 and step 6. The pipelines build will fail due to the merge conflict.
      9. Configure branch Branch permissions on the develop branch and set "Check the last commit for at least 1 successful build and no failed builds" and "Prevent a merge with unresolved merge checks"
      10. Due to the above branch permission, the first PR is not allowed to be merged because of the failed build on the second PR which has the same source branch.

      Expected Results

      Merge check should allow merging the first PR because the build for this PR is successful.

      Actual Results

      Merge check prevents merging the first PR because of the failed build on the second PR which has the same source branch.

      Workaround

      Currently, there is no known workaround for this behavior. A workaround will be added here when available

              Unassigned Unassigned
              dbhat@atlassian.com Dheeraj (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: