feat(git): add .LatestTag template property #4422
Merged
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.
Prerequisites
Description
🤖 Generated by Copilot at 39bff29
This pull request adds a new option to the
Git
segment to show the latest tag name for the current git repo. It also updates the documentation and the theme schema to reflect the new feature.How
🤖 Generated by Copilot at 39bff29
FetchLatestTag
to thesegments
package and thethemes/schema.json
file, with a default value of false and a title and description for the user interface (link, link)LatestTag
to theGit
type, which stores the latest tag name for the git repo (link)Enabled
function of theGit
type, which checks if theFetchLatestTag
property is set to true, and if so, runs a git command to get the latest tag name and assigns it to theLatestTag
field (link)website/docs/segments/git.mdx
file, which documents theFetchLatestTag
property and its default value and description for the users of the git segment (link)website/docs/segments/git.mdx
file, which documents the.LatestTag
template variable and its type and description for the users of the git segment (link)