Follow up on GitHub tag build documentation and ref classification - #5201
Open
arturcic wants to merge 1 commit into
Open
Follow up on GitHub tag build documentation and ref classification#5201arturcic wants to merge 1 commit into
arturcic wants to merge 1 commit into
Conversation
arturcic
force-pushed
the
codex/5198-tag-build-follow-up
branch
from
September 10, 2026 13:15
154996f to
c3feea5
Compare
|
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.



Description
Follow-up to #5198, addressing the review feedback that remained after it merged:
ReferenceName.IsTagto classify the GitHub Actions tag reference instead of duplicating the tag-prefix check.ReferenceNameis the shared reference-name value object; the backend-specificTagrepresents a repository object.GITHUB_REF_TYPEandGITHUB_REFidentify branch and tag builds, including manually dispatched historical tag builds and the local tag/HEAD matching requirement.Why
ReferenceNamerather thanTag?The suggestion was to reuse an existing value object for parsing and validation. At this point the build agent only has the
GITHUB_REFstring and needs to determine whether it names a tag.ReferenceNamealready owns that classification throughIsTag, without requiring repository access.GitVersion.Git.Tagis an internal implementation in the LibGit2Sharp backend. Its constructor requires aLibGit2Sharp.Tag, a diff object, and a repository cache; it represents an existing repository tag and resolves its target commit. It is not a parser for an environment-variable string. Using it here would couple the build-agent adapter to one Git backend and require repository objects for a reference-name check.Using
ReferenceName.IsTagtherefore follows the intent of the suggestion while keeping the adapter independent of the Git backend. It preserves the existing ordinal tag-prefix classification; it does not claim to validate tag existence or perform full Git ref-name validation.GitPreparerremains responsible for finding the selected local tag and checking that its commit matches HEAD.Related Issue
Follow-up to #5198, which resolved #4212.
Review feedback: reference-name classification and request for a follow-up.
How Has This Been Tested?
git diff --checkpassed.The ref-classification change preserves the existing ordinal, case-sensitive tag-prefix behavior.