Skip to content

Commit 3b8db5a

Browse files
committed
Code review remarks applied.
1 parent b6fa0ac commit 3b8db5a

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

BREAKING_CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
* The `BranchPrefixToTrim` configuration property has been removed. `RegularExpression` is now used to capture named groups instead.
3333
* Default `RegularExpression` for feature branches is changed from `^features?[/-]` to `^features?[/-](?<BranchName>.+)` to support using `{BranchName}` out-of-the-box
3434
* Default `RegularExpression` for unknown branches is changed from `.*` to `(?<BranchName>.*)` to support using `{BranchName}` out-of-the-box
35+
* The branch related property `IsMainline` in the configuration system has been renamed to `IsMainBranch`
3536
3637
## v5.0.0
3738

schemas/6.0/GitVersion.configuration.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
},
7070
"increment": {
7171
"$ref": "#/$defs/incrementStrategy"
72-
},f
72+
},
7373
"is-main-branch": {
7474
"$ref": "#/$defs/nullableOfBoolean"
7575
},

src/GitVersion.Core/Core/MainlineBranchFinder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ public IDictionary<string, List<IBranch>> FindMainlineBranches(ICommit commit)
3030
{
3131
var branchOriginFinder = new BranchOriginFinder(commit, this.repositoryStore, this.configuration, this.log);
3232
return this.repository.Branches
33-
.Where(BranchIsMainBranch)
33+
.Where(IsMainBranch)
3434
.Select(branchOriginFinder.BranchOrigin)
3535
.Where(bc => bc != BranchCommit.Empty)
3636
.GroupBy(bc => bc.Commit.Sha, bc => bc.Branch)
3737
.ToDictionary(group => group.Key, x => x.ToList());
3838
}
3939

40-
private bool BranchIsMainBranch(INamedReference branch)
40+
private bool IsMainBranch(INamedReference branch)
4141
{
4242
var matcher = new MainlineConfigBranchMatcher(branch, this.log);
4343
return this.mainlineBranchConfigurations.Any(matcher.IsMainBranch);

0 commit comments

Comments
 (0)