feat: make sidebar CI and review glyphs configurable via .env - #5
Open
ubuntudroid wants to merge 1 commit into
Open
feat: make sidebar CI and review glyphs configurable via .env#5ubuntudroid wants to merge 1 commit into
ubuntudroid wants to merge 1 commit into
Conversation
Each glyph the poller puts on a space label — the CI dot
(GITLAB_CI_ICON_OK/_FAIL/_RUN/_NONE) and the review badge
(GITLAB_CI_ICON_CONFLICT/_CHANGES/_APPROVED/_DRAFT/_AWAITING) — can now
be overridden via the plugin's .env, e.g. with monochrome Nerd Font
icons. Emoji stay the default. A var that is set but empty hides the
glyph (hence ${VAR-default}, not ${VAR:-default}).
gci_strip_ci_prefix hunts the configured glyphs plus the emoji
defaults, so labels decorated before an icon-config change still strip
instead of accumulating, and skips empty patterns ("" would match
anything).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ubuntudroid
added a commit
to ubuntudroid/herdr-git-status
that referenced
this pull request
Jul 22, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> # Conflicts: # lib.sh # test.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Lets users override every sidebar glyph via the plugin's existing
.envmechanism (gci_load_env), defaulting to the current emoji:GITLAB_CI_ICON_OK/_FAIL/_RUN/_NONE(defaults 🟢 🔴 🟡 ⚪)GITLAB_CI_ICON_CONFLICT/_CHANGES/_APPROVED/_DRAFT/_AWAITING(defaultsEmoji stay the default so plain terminals keep working; the README shows a commented Nerd Font preset (needs a Nerd-patched font, else tofu). A var that is set but empty hides the glyph — e.g.
GITLAB_CI_ICON_NONE=shows no dot for "no pipeline" — which is why the code uses${VAR-default}rather than${VAR:-default}.Details worth calling out:
gci_strip_ci_prefixis driven by the same configured values, and additionally keeps hunting the emoji defaults — labels decorated before an icon-config change still strip instead of accumulating a prefix per poll tick. Empty patterns are skipped (""would match anything and corrupt labels).gci_review_badge_glyphnow delegates togci_review_glyph, so badge and My-MRs pane can't drift apart.poller-ctl.shhardcoded⚪; it now routes throughgci_status_emojiso the_NONEoverride applies there too.Heads-up: a separate PR adding a
mergedstate +🔀badge is coming soon and touches the same glyph functions; whichever lands second just applies the same${VAR-default}pattern to themergedglyph — trivial rebase.Test plan
bash test.sh— 119 checks green. New coverage: per-state overrides, badge filtering with overrides, empty-override hiding, strip round-trips built the waypoll_oncebuilds labels, default-emoji-still-strips migration case, and the empty-pattern strip guard (each new test was watched failing first)..envpreset: sidebar labels render the monochrome glyphs,GITLAB_CI_ICON_NONE=hides the "no pipeline" dot, andpoller stoprestores labels cleanly.🤖 Generated with Claude Code