The @PLUGIN@ plugin provides support for defining code owners for directories and files in a repository/branch.

If the @PLUGIN@ plugin is enabled, changes can only be submitted if all touched files are covered by approvals from code owners.

IMPORTANT: Before installing/enabling the plugin, or enabling the code owners functionality for further projects, follow the instructions from the setup guide.

NOTE: This plugin is specifically developed to support code owners for the Chrome and Android teams at Google. This means some of the functionality and design decisons are driven by Google-specific use-cases. Nonetheless the support for code owners is pretty generic and configurable so that it should be suitable for other teams as well.

Functionality

  • Support for defining code owners:
    • Code owners can be specified in OWNERS files that can appear in any directory in the source branch.
    • Default code owners can be specified on repository level by an OWNERS file in the refs/meta/config branch.
    • Global code owners across repositories can be configured.
    • A fallback code owners policy controls who owns files that are not covered by OWNERS files.
    • Code owners can be specified by email (groups are not supported).
    • Inheritance from parent directories is supported and can be disabled.
    • Including an OWNERS file from other directories / branches / projects is possible (only on the same host).
    • File globs can be used.
    • see code owners documentation and OWNERS syntax

  • Prevents submitting changes without code owner approvals:
    • Which votes count as code owner approvals is configurable.
    • Implemented as Java submit rule (no Prolog).

  • Support for overrides:
  • UI extensions on change screen:
    • Code owner suggestion
    • Display of the code owners submit requirement
    • Display of code owner statuses in the file list
    • Change messages that list the owned paths.
    • see UI walkthrough and user guide

  • Extensible:
    • Supports multiple backends which can implement different syntaxes for OWNERS files.

  • Validation:
    • updates to OWNERS files are validated on commit received and submit
    • OWNERS files can be validated on demand to detect consistency issues

  • Rich REST API:
  • Highly configurable: