Skip to main content

Module policy

Module policy 

Source
Expand description

What this repository holds a commit to, as data.

The type vocabulary is deliberately not here: crate::release::ChangeKind already is the list of words a commit’s type may be, the changelog already renders from it, and a second copy under a types: key would be exactly the duplication this subsystem exists to remove. What is here is only what a repository can reasonably decide differently — a subject width, and how loudly to report three things that are findings in one project and noise in another.

The block is read from .ai/repo/policy.yaml, the canonical policy this repository already has, and every field has the default this repository’s own history satisfies, so a policy that says nothing about commits still yields the same verdict.

use majordomus_cli::commit::CommitPolicy;
let p = CommitPolicy::default();
assert_eq!(p.subject_max_chars, 72);

Structs§

CommitPolicy
commit: in the repository policy: the subject width, and how loudly to report the four judgements a repository can reasonably decide differently about. The type vocabulary is deliberately absent — it is crate::release::ChangeKind, which the changelog already renders from, and a second copy of those words here is the duplication this subsystem exists to remove.

Enums§

FindingLevel
How loudly one judgement is reported, including not at all.

Constants§

GIT_AUTHORED_PREFIXES
CommitSubject prefixes git itself writes, which no commit convention applies to.

Functions§

git_authored
Whether git composed this subject rather than a person.