DevSensei | Code Owners for Bitbucket Cloud

What differentiates the app from the native Code Owners feature of Bitbucket Cloud?

As of March 2024, Bitbucket Cloud includes a native Code Owners feature.

The following table aims at providing users with a clear understanding of the feature set available for the native Bitbucket Code Owners feature and our Code Owners app: 

Feature

Code Owners for Bitbucket app

Bitbucket native Code Owners feature

  • file/ folder path patterns

🔗

/features/FeatureCode.java @developer

/features/FeatureCode.java @developer
  • file extension patterns

🔗

*.css @developer

*.css @developer
  • exclusion patterns

🔗

frontend/* @frontend-team
# no mandatory review for tests
!frontend/*/tests/**

  • Match options of patterns

🔗

src/{main/**,test/**} @devs
**.{ts,js} @web-devs

  • assign user

🔗

  • Display Name

  • Nickname (Public name) of Bitbucket Cloud users

NOT supported:

  • e-mail addresses or user slugs

foo.py    @"Michael Foo"

foo.py    individual@example.com
bar.py    @individual-username  
baz.py    @workspace-slug/group-name
  • assign user groups

🔗

src/** @@developers
@@@<newgroupname> <members>

  • Bitbucket Cloud groups

  • custom groups defined in teams.yml:

backend:
  contributors:
    - individual1@example.com
    - individual2@example.com
  • assign random subset of reviewers

❌ (only supported in the DC edition)

*.scala   @workspace-slug/reviewer-group:random(2)
  • assign least busy (have the fewest active PR reviews) reviewers

*.scala   @workspace-slug/reviewer-group:least_busy(2)
  • custom merge checks

 

🔗

# At least one senior and two code owners in total must approve.
OverallCheck(2)
Check(@@Seniors >= 1)

  • Fallback groups
    (users who can be added as reviewers and whose approval counts for merge checks in case of code owners absence)

🔗🔗

@@@FallbackOwners @paul @monica

  • mono-repos support: possibility to have different CODEOWNERS files in different folders

  • Code Owners Playground for interactive experimentation

🔗