Skip to content

Commit 950a03b

Browse files
committed
refactor(GitVersion.Configuration): fix pattern assigned to DefaultLabelNumberPattern
1 parent 9c9d75f commit 950a03b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/GitVersion.Configuration/BranchConfiguration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ internal record BranchConfiguration : IBranchConfiguration
2323
public bool? PreventIncrementOfMergedBranchVersion { get; internal set; }
2424

2525
[JsonPropertyName("label-number-pattern")]
26-
[JsonPropertyDescription(@"The regular expression pattern to use to extract the number from the branch name. Defaults to '[/-](?<number>\d+)[-/]'.")]
26+
[JsonPropertyDescription($"The regular expression pattern to use to extract the number from the branch name. Defaults to '{ConfigurationConstants.DefaultLabelNumberPattern}'.")]
2727
[JsonPropertyDefault(ConfigurationConstants.DefaultLabelNumberPattern)]
2828
public string? LabelNumberPattern { get; internal set; }
2929

src/GitVersion.Core/Configuration/ConfigurationConstants.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ internal static class ConfigurationConstants
1919
internal const string StringDefaultUpdateBuildNumber = "true";
2020
public const SemanticVersionFormat DefaultSemanticVersionFormat = SemanticVersionFormat.Strict;
2121
internal const string StringDefaultSemanticVersionFormat = nameof(SemanticVersionFormat.Strict);
22-
public const string DefaultLabelNumberPattern = @"[/-](?<number>\d+)[-/]";
22+
public const string DefaultLabelNumberPattern = @"[/-](?<number>\d+)";
2323

2424
public const string MainBranchKey = "main";
2525
public const string MasterBranchKey = "master";

0 commit comments

Comments
 (0)