• Bob Van Landuyt's avatar
    Allow specifying code owners in a CODEOWNERS file · dbde2b33
    Bob Van Landuyt authored
    In a file called `CODEOWNERS` in the root of a repository, in the
    `docs/`-folder or in the `.gitlab/` folder it is possible to define
    users that are 'owners' for specific code paths.
    
    A pattern can be defined on each line in the same way as it would in a
    `.gitignore` file. After that, one or more users can be specified
    using their username (using the `@username` format) or email address
    linked to their account. Comments can be preceded with a `#`. If a
    filename starts with `#` this can be escaped using `/#`.
    
    For example:
    
        # All files in the `docs/` directory should be reviewed by a
        # technical writer:
        docs/* @jane @joe
    
        # Ruby files should be reviewed by a backend maintainer:
        *.rb alice@development.gitlab.org
    
    The code owners will be displayed when viewing a blob, if a user for
    the username/email cannot be found, nothing will be shown.
    
    When multiple patterns match the blob being viewed, the last entry
    will be used.
    dbde2b33
file.rb 2.34 KB