Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

auto-assignment of reviewers

  • file/ folder path patterns

🔗

Code Block
/features/FeatureCode.java @developer-1

Code Block
/features/FeatureCode.java @developer-1
  • file extension patterns

🔗

Code Block
*.css @developer-1

Code Block
*.css @developer-1
  • exclusion patterns

🔗

Code Block
frontend/* @frontend-team
# no mandatory review for tests
!frontend/*/tests/*.css*

  • Match options of patterns

🔗

Code Block
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

Code Block
foo.py    @"Michael Foo"

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

🔗

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

  • Bitbucket Cloud groups

  • custom groups defined in teams.yml:

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

🔗

Code Block
CODEOWNERS.toplevel.assignment_routing random 2

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

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

🔗

Code Block
# At least a 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)

🔗🔗

Code Block
@@@FallbackOwners @paul @monica

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

🔗

  • Code Owners Playground for interactive experimentation

🔗

...