-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Summary
We propose adding a new configuration flag (e.g., allow_unowned_files: true) to config/code_ownership.yml.
This flag would allow the gem to run successfully even if some files do not have an owner, without interfering with other ownership mechanisms like File-Annotation Based Ownership (# @team MyTeam).
Problem: Current Workaround Conflicts with Annotations
Our team does not enforce 100% code ownership coverage. We only assign owners to critical files, and most of our files are intentionally left unowned.
To prevent code_ownership from failing, we tried setting unowned_globs to cover all files:
# config/code_ownership.yml
unowned_globs:
- '**/*'This successfully prevents errors about unowned files.
However, we discovered that setting unowned_globs: ['**/*'] appears to disable File-Annotation Based Ownership. Files that have a # @team MyTeam annotation are no longer recognized as being owned by that team (presumably because unowned_globs takes precedence and stops further processing).
Desired Behavior
We want to achieve two goals at the same time:
- Allow unowned files: The build should not fail if many files have no owner assigned.
- Respect file annotations: Files that do have a
# @team MyTeamannotation should still be correctly recognized and owned by that team.
Proposed Solution
We suggest adding a new boolean flag to config/code_ownership.yml, such as allow_unowned_files:
# config/code_ownership.yml
allow_unowned_files: true
# We would remove the unowned_globs: ['**/*']How this flag would work:
- When
allow_unowned_files: true,code_ownershipwould not raise an error if it finds files that have no owner (from any source:owned_globs,package_owners, or annotations). - However, it would still process all files to identify owners for files that do have annotations or match other rules.
This would allow teams like ours to use code_ownership to manage owners for the files we care about, without being forced to achieve 100% coverage.
Thank you for considering this feature!
Metadata
Metadata
Assignees
Labels
Type
Projects
Status