Skip to main content
Skip table of contents

CODEOWNERS settings

The syntax for plugin settings in the file CODEOWNERS is

CODEOWNERS.<setting> <value>

The following settings are currently supported:

  1. Restrict code owners functionality for a certain destination branch. This CODEOWNERS file is then only active for pull requests with matching destination branch. Supported pattern format.
    CODEOWNERS.destination_branch_pattern <branchpattern>
    
  2. To exclude code owners functionality for pull requests with certain source branches, This CODEOWNERS file is then inactive for pull requests with matching source branch. Supported pattern format.
    CODEOWNERS.source_branch_exclusion_pattern <branchpattern>
    
  3. Enable subdirectories overrides, where a CODEOWNERS file in a subdirectory overrides all settings. Ideal when you have independent projects in subdirectories which require independent rules. By default, this is disabled and only the CODEOWNERS at the top of the repository is used.
    CODEOWNERS.toplevel.subdirectory_overrides enable
    
  4. Suppress info comment on pull request creation about added code owners. Comments are enabled by default.
    CODEOWNERS.toplevel.create_pull_request_comment disable
    
  5. Removes existing approvals for new commits in pull request Similar to Atlassian's Auto Unapprove app, but skips unapproval for Code Owners whose owned files did not change in new commits. (opt-in)
    CODEOWNERS.toplevel.auto_unapprove_on_change enable
    
  6. Custom assignment routing for pull requests. You can reduce the number of Code Owners that are automatically assigned to a pull request. (opt-in) Currently, the only available method of assignment is at random.
    CODEOWNERS.toplevel.assignment_routing random <number-per-group>
    # Example: CODEOWNERS.toplevel.assignment_routing random 2
    
    Note: The algorithm will take the specified number of code owners (when possible) for each group affected by the pull request.
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.