Identity
identity
Git identity resolution with schedule-based profile switching.
GitIdentity
GitProfileConfig
Bases: BaseModel
Full git-profiles.toml configuration.
Source code in packages/axm-git/src/axm_git/core/identity.py
Schedule
Bases: BaseModel
Schedule configuration with rules.
Source code in packages/axm-git/src/axm_git/core/identity.py
ScheduleRule
Bases: BaseModel
A time-based rule mapping to a profile.
Source code in packages/axm-git/src/axm_git/core/identity.py
author_args(identity)
Build --author arguments for a git command.
load_config(config_path=None)
Load and validate a git-profiles TOML config file.
File-absent returns None silently. File-present-but-malformed
returns None and emits a WARNING referencing path and the
exception class. After successful parse, also warns when
schedule.rules is non-empty but workspace_paths is empty
(governance config is configured but cannot apply).
Source code in packages/axm-git/src/axm_git/core/identity.py
resolve_by_override(config, profile_override)
Resolve identity from an explicit profile override.
Returns the matching identity, or None when profile_override
is None or names an unknown profile.
Source code in packages/axm-git/src/axm_git/core/identity.py
resolve_by_schedule(config, workspace_path, now)
Resolve identity from schedule rules for AXM workspaces.
Returns None when the path is outside AXM workspaces or no
schedule rule matches.
Source code in packages/axm-git/src/axm_git/core/identity.py
resolve_identity(workspace_path, *, now=None, profile_override=None, config_path=None)
Resolve the git identity for the given workspace.
Returns None when no config is available or an unknown profile
is requested via profile_override.