Versions Compared

Key

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

...

  • Subdirectory overrides: You can now enable subdirectory overrides, allowing subdirectories to have their own Code Owners files. This is great if there are multiple projects in a shared repository and each project needs to manage their own Code Owner rules.
    In the top-level CODEOWNERS file add:
    CODEOWNERS.toplevel.subdirectory_overrides enable
    Now a subdirectory can have its own rules, for example in project-a/CODEOWNERS:

    Code Block
    #Project A rules
    * @@ProjectATeam

...

  • Destination branch activation: Per default, a Code Owner file affects pull requests for all destination branch names. You can make a Code Owner file to only apply pull requests with specific destination branches. For that you need to configure the destination_branch_pattern option in your Code Owner file, where you can configure a pattern for matching destination branches in pull requests.

    Used pattern format is similar to the Atlassian branch permission patterns.

    For example, if you want to activate code owners only for pull requests for the destination branch master :

    Code Block
    CODEOWNERS.destination_branch_pattern master

    If you also want to have pull requests with release branches covered by Code Owners, also add this next line:

    Code Block
    CODEOWNERS.destination_branch_pattern release/*

  • Disable Code Owner comments: By default, Code Owners adds a comment with the code owners of the pull request and the reason for inclusion. If you don’t need this comment and want fewer notifications, you can now disable it:

    Code Block
    CODEOWNERS.toplevel.create_pull_request_comment disable

...