pub struct OwnershipFacts {
pub group_count: usize,
pub transitive_only_count: usize,
pub unowned_direct_count: usize,
pub groups: Vec<OwnerGroupFact>,
pub groups_omitted: usize,
pub slices: Vec<OwnershipSliceFact>,
}Expand description
How far a changeset reaches across CODEOWNERS owner groups.
Computed from the CODEOWNERS file alone: no git history is read, so the
section is present whenever a CODEOWNERS file is found, also when the churn
walk behind routing finds nothing. Each file maps to its primary owner
(the first owner of the last matching rule). A file that no rule matches,
or that a GitLab negation rule matches, belongs to the (unowned) group.
The owner strings use the same vocabulary as routing.units[].expert.
Absent from the brief when no CODEOWNERS file is found, or when the file
cannot be read or does not parse. A configured codeowners path that
fails also prints a warning on stderr.
groups[].direct_count counts all changed files, source or not, so the
sum over all groups is the number of changed files, not the size of
impact_closure.in_diff. Slice owners count only the files of the
partition units, which are source files.
Fields§
§group_count: usizeDistinct owner groups across the changed files and the impact closure.
The (unowned) group counts as one group. Exact, never capped.
transitive_only_count: usizeOwner groups that own no changed file and appear only through the impact closure. Exact, never capped.
unowned_direct_count: usizeChanged files that belong to the (unowned) group.
groups: Vec<OwnerGroupFact>The owner groups, sorted by direct_count descending, then
affected_count descending, then owner. At most OWNER_GROUP_CAP
entries. The counts in each entry are exact.
groups_omitted: usizeHow many owner groups did not fit within OWNER_GROUP_CAP and are
absent from groups. Zero when nothing was omitted.
slices: Vec<OwnershipSliceFact>The owner set of each independent slice, aligned by index with
partition.independent_slices. Present only when that list is present
(two or more slices). A fact for the reviewer, never a demand to split.