DevSensei | Code Owners for Bitbucket

How do Auto-Merge and Code Owners interact?

For the most part, Auto-Merge and Code Owners are two independent features next to each other. However, Auto-Merge will skip Code Owners merge checks in the event of a [Ship] or [Show] pull request.

In particular:

  • a [Show] pull request doesn’t require any approvals to be merged. Moreover, if Code Owners requires approvals for that same pull request, they will be skipped. Therefore the pull request will be automatically merged even if Code Owners merge checks are not fulfilled.

  • a [Show>=2] pull request will require two approvals, regardless of who they are coming from. If for its part, the merge checks on your repository are configured to require 3 approvals, then in total only 3 approvals will be necessary. Code Owners merge checks will be skipped.

  • The same applies for [Ask>=2], but they the key difference is that the Ask pull request will not skip Code Owners merge checks. The other difference is that it will not auto-merge.

  • a [Ship] pull request will skip assignment of Code Owners. This is inline with the philosophy of Ship/Show/Ask: Ship pull request are meant for tiny and trivial changes to your repository. Such changes will be more effective if you don’t bother other team members to carry them through.