Skip to content

Commit 2292a2a

Browse files
committed
refactor(GitVersion.Core): add const var DefaultLabelNumberPattern
1 parent 4a89870 commit 2292a2a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/GitVersion.Core/Configuration/BranchConfiguration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ internal record BranchConfiguration : IBranchConfiguration
2424

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

3030
[JsonPropertyName("track-merge-target")]

src/GitVersion.Core/Configuration/ConfigurationConstants.cs

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

2526
public const string MainBranchKey = "main";
2627
public const string MasterBranchKey = "master";

0 commit comments

Comments
 (0)