Skip to content

Latest commit

 

History

History
executable file
·
50 lines (30 loc) · 2.91 KB

README_DOCS.md

File metadata and controls

executable file
·
50 lines (30 loc) · 2.91 KB

codeowners

codeowners(name, pattern, patterns, team, teams)

A codeowners-rule represents one or many rows in a CODEOWNERS file.

team and teams are mutually exclusive. pattern and patterns are mutually exclusive.

ATTRIBUTES

Name Description Type Mandatory Default
name A unique name for this target. Name required
pattern A pattern of files (eg: '*.bzl') that the team(s) should get ownership of. In the generated CODEOWNERS, the path to this target will be prepended to the pattern. String optional ""
patterns A list of patterns, one row will be printed per pattern. See docs of pattern for more info. List of strings optional []
team The GitHub team that should get ownership of the matching files. One of team and teams must be set. String optional ""
teams A list of the GitHub teams that should get ownership of the matching files. One of team and teams must be set. List of strings optional []

generate_codeowners

generate_codeowners(name, generated_comment, owners, validate)

Creates a GitHub-compatible CODEOWNERS file based on the owners.

ATTRIBUTES

Name Description Type Mandatory Default
name A unique name for this target. Name required
generated_comment A comment to insert at the top of the generated file String optional "# This file was generated by rules_codeowners / Bazel. Don't edit it directly"
owners A list of codeowners and generate_codeowners. One generate_codeowners can include another generate_codeowners to achieve nested rules. List of labels required
validate Set to True to enable strict validation of codeowners values. Disabled by default. Boolean optional False