Module bots
Expand description
Bot pattern matching + AI attribution.
Bot detection is plain substring containment (case-insensitive after a single lowercasing pass on the inputs). AI-assistance detection is the same idea: lowercase the commit message once, then check for any of the published 2024+ assistant signatures.
Structs§
- BotPatterns
- User-extensible bot-pattern set. Merges built-in
DEFAULT_BOT_PATTERNSwith any patterns from a project-level.codelorebotsfile at the repo root. File format mirrors.codeloreignore:
Constants§
- DEFAULT_
BOT_ PATTERNS - Default bot identifiers (case-insensitive substring match in email or name; the comparison lowercases both sides).
Functions§
- ai_
attribution - Classifies commit attribution as one of
"ai-authored","ai-assisted", or"human". Bot authors →ai-authored; commits with a recognized AI-assistant signature in the message →ai-assisted; otherwise →human. - ai_
attribution_ with - User-extensible variant of
ai_attribution: routes the bot check through aBotPatternsinstance so a project-level.codelorebotsfile participates. AI-assist message-pattern detection is unchanged (the assist patterns are not user-extensible by design). - is_bot
- True if the email or name matches any default bot pattern. Comparison
is case-insensitive —
Dependabot[Bot]@noreply.github.commatches.