CodeownersFilter (autotransform.filter.codeowners)
The implementation for the CodeownersFilter.
- class autotransform.filter.codeowners.CodeownersFilter(*, inverted: bool = False, codeowners_file_path: str, owner: str | None = None)
Bases:
FilterA filter which uses Github CODEOWNERS files to separate changes by owner. Titles will be of the form ‘prefix <owner>’
- codeowners_file_path
The path of the CODEOWNERS file.
- Type:
str
- owner
The owner to allow files for. If None is provided, checks for unowned.
- Type:
Optional[str]
- name
The name of the Component.
- Type:
ClassVar[FilterName]
- codeowners_file_path: str
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: ClassVar[FilterName] = 'codeowners'
- owner: str | None
- classmethod path_legacy_setting_validator(values: Dict[str, Any]) Dict[str, Any]
Validates codeowners_file_path using legacy codeowners_location setting.
- Parameters:
values (Dict[str, Any]) – The values used to configure the CodeownersFilter.
- Raises:
ValueError – Raised if both codeowners_file_path and codeowners_location are supplied.
- Returns:
The fixed values.
- Return type:
Mapping[str, Any]