Skip to content

Commit 784e096

Browse files
fix: allow period for label names
1 parent 2335da8 commit 784e096

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/GitVersion.Core/Core/RegexPatterns.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ internal static partial class RegexPatterns
3434
[StringSyntax(StringSyntaxAttribute.Regex, Options)]
3535
internal const string SanitizeNameRegexPattern = "[^a-zA-Z0-9-]";
3636

37+
[StringSyntax(StringSyntaxAttribute.Regex, Options)]
38+
internal const string SanitizeLabelRegexPattern = "[^a-zA-Z0-9-.]";
39+
3740
#if NET9_0_OR_GREATER
3841
[GeneratedRegex(SwitchArgumentRegexPattern, Options)]
3942
public static partial Regex SwitchArgumentRegex { get; }

src/GitVersion.Core/Extensions/ConfigurationExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ private static bool ShouldBeIgnored(ICommit commit, IIgnoreConfiguration ignore)
134134
var labelPlaceholders = BuildLabelPlaceholders(configuration.RegularExpression, effectiveBranchName);
135135

136136
return label.FormatWith(labelPlaceholders, environment)
137-
.RegexReplace(RegexPatterns.SanitizeNameRegexPattern, "-");
137+
.RegexReplace(RegexPatterns.SanitizeLabelRegexPattern, "-");
138138
}
139139

140140
public TaggedSemanticVersions GetTaggedSemanticVersion()

0 commit comments

Comments
 (0)