Skip to content

pjullrich/pushin-cli

Back Fix import bugs; add colored output and picker submit hint

Commit details

Fix import bugs; add colored output and picker submit hint

Description

The batch picker listed existing pushin.eu repos via GET /user/repos and swallowed any failure into an empty set, so already-imported repos were never pre-deselected. It now aborts when that listing fails rather than silently re-selecting everything. Harden extract_message so an HTML error body (e.g. a 404 page) is collapsed to a short note instead of dumped. MultiSelect now spells out "enter to import selected" (leading the help line) and echoes a clean one-line count on submit instead of every selected row's full label. Add semantic color to stderr progress: blue for a new import, yellow for warnings, red for errors. Color requires a real stderr tty (never force-enabled by a knob, so PUN_OUTPUT=tty can't inject codes into a redirected log); PUN_OUTPUT=plain suppresses it and NO_COLOR wins when present and non-empty. The SGR wrapping is a pure `colorize` function so it's unit-tested without touching the process-global flag.

Metadata

Author
Peter Ullrich PJUllrich@users.noreply.github.com
Committed
Commit

Contributors

  • Peter Ullrich PJUllrich@users.noreply.github.com Author
  • Claude Opus 4.8 (1M context) noreply@anthropic.com Co-author