feat: add showGitInfo() for git tag and hash display #41
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pxlrbt/filament-environment-indicator!41
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/git-tag-hash"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds a general ->showGitInfo(Closure) method that receives a lazy GitInfo instance (branch(), tag(), hash()) and returns the string to render in the badge. This enables displaying the git tag and/or short commit hash, e.g. "2.2.0 - 12345678", in addition to the branch.
->showGitBranch() is now a convenience wrapper over the same GitInfo mechanism and keeps its existing behavior (no breaking change). Both can be combined via showGitInfo(). Git lookups remain opt-in and degrade to null when exec() is unavailable.
Long values are truncated in the badge (with the full value on hover) to keep it compact, per maintainer guidance.
Closes #27
Thanks!
Thank you so much @pxlrbt! As part of my CodePath AI capstone course, I was learning to leverage AI tools to navigate and contribute to real-world codebases. I'm really grateful for your openness in letting me take on this issue and review my PR. This has been great and happy to have contributed. :)