Module utils

Module utils 

Source
Expand description

Text utility functions for Aptu.

Provides reusable text formatting utilities for truncation and relative time display. These functions are used by CLI, and will be available to iOS and MCP consumers.

Functions§

format_relative_time
Formats a DateTime<Utc> as relative time (e.g., “3 days ago”).
infer_repo_from_git
Infers the GitHub repository (owner/repo) from the local git config.
is_priority_label
Check if a label is a priority label (p0-p4 or priority: high/medium/low).
parse_and_format_relative_time
Parses an ISO 8601 timestamp and formats it as relative time.
parse_git_remote_url
Parses a git remote URL to extract owner/repo.
truncate
Truncates text to a maximum length with default ellipsis suffix “…”.
truncate_with_suffix
Truncates text to a maximum length with a custom suffix.