Skip to content

Commit 3f213f3

Browse files
committed
Rename ShAs to Shas IgnoreConfiguration class.
1 parent 5fca00b commit 3f213f3

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

src/GitVersion.Core.Tests/Configuration/IgnoreConfigurationTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ public void CanDeserialize()
2222
var configuration = ConfigurationSerializer.Read(reader);
2323

2424
configuration.Ignore.ShouldNotBeNull();
25-
configuration.Ignore.ShAs.ShouldNotBeEmpty();
26-
configuration.Ignore.ShAs.ShouldBe(new[] { "b6c0c9fda88830ebcd563e500a5a7da5a1658e98" });
25+
configuration.Ignore.Shas.ShouldNotBeEmpty();
26+
configuration.Ignore.Shas.ShouldBe(new[] { "b6c0c9fda88830ebcd563e500a5a7da5a1658e98" });
2727
configuration.Ignore.Before.ShouldBe(DateTimeOffset.Parse("2015-10-23T12:23:15"));
2828
}
2929

@@ -41,8 +41,8 @@ public void ShouldSupportsOtherSequenceFormat()
4141
var configuration = ConfigurationSerializer.Read(reader);
4242

4343
configuration.Ignore.ShouldNotBeNull();
44-
configuration.Ignore.ShAs.ShouldNotBeEmpty();
45-
configuration.Ignore.ShAs.ShouldBe(new[] { "b6c0c9fda88830ebcd563e500a5a7da5a1658e98", "6c19c7c219ecf8dbc468042baefa73a1b213e8b1" });
44+
configuration.Ignore.Shas.ShouldNotBeEmpty();
45+
configuration.Ignore.Shas.ShouldBe(new[] { "b6c0c9fda88830ebcd563e500a5a7da5a1658e98", "6c19c7c219ecf8dbc468042baefa73a1b213e8b1" });
4646
}
4747

4848
[Test]
@@ -56,7 +56,7 @@ public void WhenNotInConfigShouldHaveDefaults()
5656
var configuration = ConfigurationSerializer.Read(reader);
5757

5858
configuration.Ignore.ShouldNotBeNull();
59-
configuration.Ignore.ShAs.ShouldBeEmpty();
59+
configuration.Ignore.Shas.ShouldBeEmpty();
6060
configuration.Ignore.Before.ShouldBe(null);
6161
}
6262

src/GitVersion.Core.Tests/VersionCalculation/NextVersionCalculatorTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public void MergeFeatureIntoMainlineWithMinorIncrement()
162162
{
163163
{ "feature", new BranchConfiguration { Increment = IncrementStrategy.Minor } }
164164
},
165-
Ignore = new IgnoreConfiguration { ShAs = new List<string>() },
165+
Ignore = new IgnoreConfiguration { Shas = new List<string>() },
166166
MergeMessageFormats = new Dictionary<string, string>()
167167
};
168168

@@ -191,7 +191,7 @@ public void MergeFeatureIntoMainlineWithMinorIncrementAndThenMergeHotfix()
191191
{
192192
{ "feature", new BranchConfiguration { Increment = IncrementStrategy.Minor } }
193193
},
194-
Ignore = new IgnoreConfiguration { ShAs = new List<string>() },
194+
Ignore = new IgnoreConfiguration { Shas = new List<string>() },
195195
MergeMessageFormats = new Dictionary<string, string>()
196196
};
197197

src/GitVersion.Core/Configuration/IgnoreConfiguration.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@ namespace GitVersion.Configuration;
55

66
public class IgnoreConfiguration
77
{
8-
public IgnoreConfiguration() => ShAs = Enumerable.Empty<string>();
8+
public IgnoreConfiguration() => Shas = Enumerable.Empty<string>();
99

1010
[YamlMember(Alias = "commits-before")]
1111
public DateTimeOffset? Before { get; set; }
1212

1313
[YamlMember(Alias = "sha")]
14-
public IEnumerable<string> ShAs { get; set; }
14+
public IEnumerable<string> Shas { get; set; }
1515

1616
[YamlIgnore]
17-
public virtual bool IsEmpty => Before == null && ShAs.Any() == false;
17+
public virtual bool IsEmpty => Before == null && Shas.Any() == false;
1818

1919
public virtual IEnumerable<IVersionFilter> ToFilters()
2020
{
21-
if (ShAs.Any()) yield return new ShaVersionFilter(ShAs);
21+
if (Shas.Any()) yield return new ShaVersionFilter(Shas);
2222
if (Before.HasValue) yield return new MinDateVersionFilter(Before.Value);
2323
}
2424
}

src/GitVersion.Core/VersionCalculation/MainlineVersionCalculator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public SemanticVersionBuildMetaData CreateVersionBuildMetaData(ICommit? baseVers
9393
var ignore = context.Configuration.Ignore;
9494
if (!ignore.IsEmpty)
9595
{
96-
var shasToIgnore = new HashSet<string>(ignore.ShAs);
96+
var shasToIgnore = new HashSet<string>(ignore.Shas);
9797
commitLogs = commitLogs
9898
.Where(c => ignore.Before is null || c.When > ignore.Before && !shasToIgnore.Contains(c.Sha));
9999
}

0 commit comments

Comments
 (0)