Prerequisites
GitVersion package
GitVersion.Tool
GitVersion version
6.8.0
Operating system
N/A
What are you seeing?
If I use GITHUB_HEAD_REF as an environment variable for labels, it can produce labels that have '/' in them which is not compliant with Semver pre-release labels (which should be A-Z, a-z, 0-9 and '-').
This is not the case when using {BranchName} as a label, which sanitizes the output correctly, and is specific to environment variables.
What is expected?
The label should be generated with correct and valid charaacters.
eg.
export GITHUB_HEAD_REF="feature/my-branch"
# Correct
{env:GITHUB_HEAD_REF} => 'feature-my-branch'
# Incorrect
{env:GITHUB_HEAD_REF} => 'feature/my-branch'
Steps to Reproduce
Use env:MY_VAR when the variable contains slashes or other non-compliant characters for label formatting.
RepositoryFixture Test
No response
Output log or link to your CI build (if appropriate).
Prerequisites
GitVersion package
GitVersion.Tool
GitVersion version
6.8.0
Operating system
N/A
What are you seeing?
If I use
GITHUB_HEAD_REFas an environment variable for labels, it can produce labels that have'/'in them which is not compliant with Semver pre-release labels (which should be A-Z, a-z, 0-9 and '-').This is not the case when using
{BranchName}as a label, which sanitizes the output correctly, and is specific to environment variables.What is expected?
The label should be generated with correct and valid charaacters.
eg.
Steps to Reproduce
Use
env:MY_VARwhen the variable contains slashes or other non-compliant characters for label formatting.RepositoryFixture Test
No response
Output log or link to your CI build (if appropriate).