Owner rules
Define what part of the code is owned by whom, and your team:
Helps to find out who should review which PR, thanks to the automatic assignment of Code Owners as reviewers to your pull requests.
Can require reviews and approvals for PRs, enforced with flexible Merge Checks based on the active Code Owners. (optional)
Want to try it out first? Access the interactive playground where you can check your Code Owner rules.
Owner rule: What? is owned by Who?
For the file pattern, the app uses the syntax of Bitbucket’s branch permission patterns.
For details, check https://confluence.atlassian.com/bitbucketserver050/branch-permission-patterns-913474681.html
Â
Example
CODEOWNERS:
**/*.java @james_gosling
**/*.scala @martin_odersky
jvm/**/*.java @brian_goetz
PR diff:
jvm/Unsafe.java
scala-compiler/AST.scala
Gives active rules and Code Owners for this PR:
**/*.scala @martin_odersky
jvm/**/*.java @brian_goetz
The active Code Owners:
Martin
Brian
are added as reviewers on PR creation/updates.
Â
Full CODEOWNERS reference
Â