Skip to content

Color Update-Repositories quiet lines by bucket and list each repository's stashes - #107

Merged
IvanPavlak merged 1 commit into
masterfrom
update-repositories-quiet-colors-and-stashes
Oct 27, 2026
Merged

IvanPavlak merged 1 commit into
masterfrom
update-repositories-quiet-colors-and-stashes

Conversation

@IvanPavlak

Copy link
Copy Markdown
Owner

Description

Update-Repositories -Quiet printed every line but one needing attention in green and colored the totals line in a different palette (updated blue, up to date green), so an updated repository did not stand out from an up-to-date one. A stash left behind (a restore that conflicted, or one made by hand and forgotten) was also invisible in the compact output the startup update prints.

  • Every repository line starts with => and is colored by its bucket: updated green (Write-LogSuccess), up to date white (Write-LogStep), need attention red (Write-LogError, still shown at the Quiet log level), skipped yellow (Write-LogStep -Style Warning). The totals counts use the same colors.

  • Under a repository's line, -Quiet lists its stashes in white: * Stashes => one tab in, each git stash list entry two tabs in, then a blank line before the next repository. Only a folder that is the top of its own repository is asked (git rev-parse --show-cdup). Repositories that are not cloned, not configured or not a repository are skipped.

  • Format-RepositoryUpdateResult, the line text and the buckets are unchanged. Without -Quiet nothing changes.

    => [MyRepo] master - updated

      * Stashes =>
      	* stash@{0}: On master: MyStash
    

    => [OtherRepo] master - up to date

    => Repositories => 1 updated, 1 up to date, 0 need attention, 0 skipped

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature / function (non-breaking change that adds functionality)
  • Deprecation (a new shape replaces an old one that keeps working and names its replacement - a ### Deprecated changelog entry with the migration, and a record in the Deprecated map of Modules/Tests/ContractBaseline.json with the version it ships in, see VERSIONING.md)
  • Breaking change (removes a deprecated shape, or cannot keep the old one working - a MAJOR under VERSIONING.md's deprecation policy)
  • Documentation only
  • Tests only
  • Refactor / chore (no behavior change)

Quality bar

  • The change is minimal and focused (one logical change; reuses existing helpers, no duplication / DRY).
  • I understand and have tested this change myself (not unreviewed AI output).
  • No machine-specific values (paths, hostnames, usernames, emails) are hardcoded in functions.
  • Any new user-facing setting is driven by Configuration.psd1 using placeholder paths ({Dev}, {User}, {MachineType}, {RepoRoot}, {AppData}).

Tests

Run-Tests -TestName "Update-Repositories"
Run-Tests -TestName "Infrastructure"

Both pass.

  • I added/updated tests under Windows/PowerShell/Modules/Tests/Modules/<Module>/.
  • All relevant tests pass locally (Run-Tests) and the Pester Tests check is green.
  • Tests cover behavior/side effects/branching, not just output text.
  • N/A - no testable behavior changed (docs/chore only).

Documentation & manifests

  • I updated docs/modules/<Module>.md for any added/renamed/removed/changed function.
  • I updated the module .psd1 FunctionsToExport.
  • I added/updated the configuration guide under docs/configuration/guides/<module>/ for every added/renamed/removed function or changed Configuration.psd1 key (stub upgraded to full if the function now reads configuration), and its module README.md index.
  • I updated docs/docs_overview.md (and docs/_sidebar.md if a page was added/removed).
  • List-Functions -ListDiscrepancies reports no discrepancies and manifest completeness holds.
  • N/A - no exported function changed.

No function, parameter or configuration key was added, renamed or removed, so the manifest, guides and overview need no change.

Tested on

Windows version: Windows 11 Pro 26H2 (Version 10.0.26300 Build 26300)
PowerShell version: 7.6.9
Machine type(s): PC via a private fork

Checklist

  • My commit messages follow the project style (imperative, sentence case, no trailing period, no Conventional-Commits prefix).
  • My branch is up to date with master.
  • I read and agree to the Code of Conduct.
  • This PR contains no secrets or personal data (tokens, real paths/hostnames/emails).

Additional notes / screenshots

The Foundation port lands in IvanPavlak/Foundation under the same branch name.

…ory's stashes

-Quiet printed every line but one needing attention in green and colored the totals in another palette (updated blue, up to date green), so an updated repository did not stand out from an up-to-date one, and a stash left behind was invisible in the form the startup update prints. Every repository line now starts with => and is colored by its bucket, and the totals counts follow the same colors: updated green, up to date white, need attention red (Write-LogError, still shown at the Quiet log level), skipped yellow. Under a repository's line, -Quiet lists its stashes in white: "* Stashes =>" one tab in, each git stash list entry two tabs in, with a blank line before the next repository. Only a folder that is the top of its own repository is asked, so a path inside another repository never shows that repository's stashes. Format-RepositoryUpdateResult, the line text and the buckets are unchanged. Released as 1.9.0.
@IvanPavlak
IvanPavlak merged commit c192c9e into master Oct 27, 2026
2 checks passed
@IvanPavlak
IvanPavlak deleted the update-repositories-quiet-colors-and-stashes branch October 27, 2026 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant