Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions standup/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def load_config() -> dict:

if not config_path.exists():
console.print(
f"[yellow]⚠️ No config found at {CONFIG_PATH}. Using defaults. Run: standup --setup[/yellow]"
f"[yellow][!] No config found at {CONFIG_PATH}. Using defaults. Run: standup --setup[/yellow]"
)
raw_config: dict[str, Any] = {}
else:
Expand All @@ -67,12 +67,12 @@ def load_config() -> dict:
raw_config = json.loads(read_text_restricted(CONFIG_PATH, label="Config file"))
except json.JSONDecodeError as exc:
console.print(
f"[red] Invalid JSON in {CONFIG_PATH}: {sanitize_error_message(exc)}[/red]"
f"[red][x] Invalid JSON in {CONFIG_PATH}: {sanitize_error_message(exc)}[/red]"
)
sys.exit(1)
except OSError as exc:
console.print(
f"[red] Could not read {CONFIG_PATH}: {sanitize_error_message(exc)}[/red]"
f"[red][x] Could not read {CONFIG_PATH}: {sanitize_error_message(exc)}[/red]"
)
sys.exit(1)

Expand All @@ -95,7 +95,7 @@ def load_config() -> dict:
ok, errors = validate_full_config(config)
if not ok:
log_event("config_validation_failed", error_count=len(errors))
console.print("[red] Config validation failed:[/red]")
console.print("[red][x] Config validation failed:[/red]")
for error in errors:
console.print(f" [red]• {error}[/red]")
console.print(f"\nFix your config at: {CONFIG_PATH}")
Expand All @@ -108,7 +108,7 @@ def load_config() -> dict:
if repo_ok:
valid_repos.append(repo)
else:
console.print(f"[yellow]⚠️ Skipping invalid repo: {message}[/yellow]")
console.print(f"[yellow][!] Skipping invalid repo: {message}[/yellow]")
config["repos"] = valid_repos

return config
Expand Down Expand Up @@ -142,4 +142,4 @@ def save_config(config: dict) -> None:
json.dumps(on_disk, indent=2),
label="Config file",
)
console.print(f"[green] Config saved to {CONFIG_PATH}[/green]")
console.print(f"[green][+] Config saved to {CONFIG_PATH}[/green]")
12 changes: 6 additions & 6 deletions standup/git_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def get_recent_commits(
try:
import git # type: ignore[import]
except ImportError:
console.print("[red] GitPython is not installed. Run: pip install gitpython[/red]")
console.print("[red][x] GitPython is not installed. Run: pip install gitpython[/red]")
return []

repo_name = Path(repo_path).name
Expand All @@ -78,14 +78,14 @@ def get_recent_commits(
try:
repo = git.Repo(repo_path)
except git.exc.InvalidGitRepositoryError:
console.print(f"[yellow]⚠️ Not a git repository: {repo_path}[/yellow]")
console.print(f"[yellow][!] Not a git repository: {repo_path}[/yellow]")
return []
except git.exc.NoSuchPathError:
console.print(f"[yellow]⚠️ Repo path not found: {repo_path}[/yellow]")
console.print(f"[yellow][!] Repo path not found: {repo_path}[/yellow]")
return []
except Exception as exc:
console.print(
f"[yellow]⚠️ Could not open repo {repo_path}: {sanitize_error_message(exc)}[/yellow]"
f"[yellow][!] Could not open repo {repo_path}: {sanitize_error_message(exc)}[/yellow]"
)
return []

Expand Down Expand Up @@ -137,7 +137,7 @@ def get_recent_commits(

if len(commits) >= MAX_COMMITS_PER_RUN:
console.print(
f"[yellow]⚠️ Commit count exceeded {MAX_COMMITS_PER_RUN}; truncating to the most recent entries.[/yellow]"
f"[yellow][!] Commit count exceeded {MAX_COMMITS_PER_RUN}; truncating to the most recent entries.[/yellow]"
)
log_event(
"commit_limit_truncated",
Expand All @@ -147,7 +147,7 @@ def get_recent_commits(
break
except Exception as exc:
console.print(
f"[yellow]⚠️ Error reading commits from {repo_path}: {sanitize_error_message(exc)}[/yellow]"
f"[yellow][!] Error reading commits from {repo_path}: {sanitize_error_message(exc)}[/yellow]"
)

return commits[:MAX_COMMITS_PER_RUN]
10 changes: 5 additions & 5 deletions standup/history.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def init_db() -> None:
except (sqlite3.Error, OSError) as exc:
log_event("db_error", operation="init")
console.print(
f"[yellow]⚠️ Could not initialize history database: {sanitize_error_message(exc)}[/yellow]"
f"[yellow][!] Could not initialize history database: {sanitize_error_message(exc)}[/yellow]"
)


Expand Down Expand Up @@ -331,7 +331,7 @@ def find_cached_standup_entry(
except sqlite3.Error as exc:
log_event("db_error", operation="find_cached")
console.print(
f"[yellow]⚠️ Could not read standup history: {sanitize_error_message(exc)}[/yellow]"
f"[yellow][!] Could not read standup history: {sanitize_error_message(exc)}[/yellow]"
)
return None

Expand Down Expand Up @@ -447,7 +447,7 @@ def save_standup(
except (sqlite3.Error, OSError, TypeError, ValueError) as exc:
log_event("db_error", operation="save")
console.print(
f"[yellow]⚠️ Could not save standup history: {sanitize_error_message(exc)}[/yellow]"
f"[yellow][!] Could not save standup history: {sanitize_error_message(exc)}[/yellow]"
)


Expand Down Expand Up @@ -480,7 +480,7 @@ def get_history(limit: int = 10) -> list[dict[str, object]]:
except (sqlite3.Error, TypeError, ValueError) as exc:
log_event("db_error", operation="history")
console.print(
f"[yellow]⚠️ Could not fetch standup history: {sanitize_error_message(exc)}[/yellow]"
f"[yellow][!] Could not fetch standup history: {sanitize_error_message(exc)}[/yellow]"
)
return []

Expand Down Expand Up @@ -512,7 +512,7 @@ def clear_history(older_than_days: int | None = None) -> int:
except (sqlite3.Error, TypeError, ValueError) as exc:
log_event("db_error", operation="clear")
console.print(
f"[yellow]⚠️ Could not clear standup history: {sanitize_error_message(exc)}[/yellow]"
f"[yellow][!] Could not clear standup history: {sanitize_error_message(exc)}[/yellow]"
)
return 0

Expand Down
Loading
Loading