@@ -27,11 +27,11 @@ public BranchConfigurationCalculator(ILog log, IRepositoryMetadataProvider repos
27
27
/// </summary>
28
28
public BranchConfig GetBranchConfiguration ( IBranch targetBranch , ICommit currentCommit , Config configuration , IList < IBranch > excludedInheritBranches = null )
29
29
{
30
- var matchingBranches = configuration . GetConfigForBranch ( targetBranch . Name . NameWithoutRemote ) ;
30
+ var matchingBranches = configuration . GetConfigForBranch ( targetBranch . Name . WithoutRemote ) ;
31
31
32
32
if ( matchingBranches == null )
33
33
{
34
- log . Info ( $ "No branch configuration found for branch { targetBranch . Name . FriendlyName } , falling back to default configuration") ;
34
+ log . Info ( $ "No branch configuration found for branch { targetBranch . Name . Friendly } , falling back to default configuration") ;
35
35
36
36
matchingBranches = BranchConfig . CreateDefaultBranchConfig ( FallbackConfigName )
37
37
. Apply ( new BranchConfig
@@ -103,7 +103,7 @@ private BranchConfig InheritBranchConfiguration(IBranch targetBranch, BranchConf
103
103
}
104
104
}
105
105
106
- log . Info ( "Found possible parent branches: " + string . Join ( ", " , possibleParents . Select ( p => p . Name . FriendlyName ) ) ) ;
106
+ log . Info ( "Found possible parent branches: " + string . Join ( ", " , possibleParents . Select ( p => p . Name . Friendly ) ) ) ;
107
107
108
108
if ( possibleParents . Count == 1 )
109
109
{
@@ -125,7 +125,7 @@ private BranchConfig InheritBranchConfiguration(IBranch targetBranch, BranchConf
125
125
// if develop exists and master if not
126
126
var errorMessage = possibleParents . Count == 0
127
127
? "Failed to inherit Increment branch configuration, no branches found."
128
- : "Failed to inherit Increment branch configuration, ended up with: " + string . Join ( ", " , possibleParents . Select ( p => p . Name . FriendlyName ) ) ;
128
+ : "Failed to inherit Increment branch configuration, ended up with: " + string . Join ( ", " , possibleParents . Select ( p => p . Name . Friendly ) ) ;
129
129
130
130
var chosenBranch = repositoryMetadataProvider . GetChosenBranch ( configuration ) ;
131
131
if ( chosenBranch == null )
@@ -135,7 +135,7 @@ private BranchConfig InheritBranchConfiguration(IBranch targetBranch, BranchConf
135
135
throw new InvalidOperationException ( "Could not find a 'develop' or 'master' branch, neither locally nor remotely." ) ;
136
136
}
137
137
138
- var branchName = chosenBranch . Name . FriendlyName ;
138
+ var branchName = chosenBranch . Name . Friendly ;
139
139
log . Warning ( errorMessage + System . Environment . NewLine + "Falling back to " + branchName + " branch config" ) ;
140
140
141
141
// To prevent infinite loops, make sure that a new branch was chosen.
@@ -189,22 +189,22 @@ private IBranch[] CalculateWhenMultipleParents(ICommit currentCommit, ref IBranc
189
189
}
190
190
else if ( branches . Count > 1 )
191
191
{
192
- currentBranch = branches . FirstOrDefault ( b => b . Name . NameWithoutRemote == Config . MasterBranchKey ) ?? branches . First ( ) ;
192
+ currentBranch = branches . FirstOrDefault ( b => b . Name . WithoutRemote == Config . MasterBranchKey ) ?? branches . First ( ) ;
193
193
}
194
194
else
195
195
{
196
196
var possibleTargetBranches = repositoryMetadataProvider . GetBranchesForCommit ( parents [ 0 ] ) . ToList ( ) ;
197
197
if ( possibleTargetBranches . Count > 1 )
198
198
{
199
- currentBranch = possibleTargetBranches . FirstOrDefault ( b => b . Name . NameWithoutRemote == Config . MasterBranchKey ) ?? possibleTargetBranches . First ( ) ;
199
+ currentBranch = possibleTargetBranches . FirstOrDefault ( b => b . Name . WithoutRemote == Config . MasterBranchKey ) ?? possibleTargetBranches . First ( ) ;
200
200
}
201
201
else
202
202
{
203
203
currentBranch = possibleTargetBranches . FirstOrDefault ( ) ?? currentBranch ;
204
204
}
205
205
}
206
206
207
- log . Info ( "HEAD is merge commit, this is likely a pull request using " + currentBranch . Name . FriendlyName + " as base" ) ;
207
+ log . Info ( "HEAD is merge commit, this is likely a pull request using " + currentBranch . Name . Friendly + " as base" ) ;
208
208
209
209
return excludedBranches ;
210
210
}
@@ -216,7 +216,7 @@ private static BranchConfig ChooseMasterOrDevelopIncrementStrategyIfTheChosenBra
216
216
BranchConfig masterOrDevelopConfig = null ;
217
217
var developBranchRegex = config . Branches [ Config . DevelopBranchKey ] . Regex ;
218
218
var masterBranchRegex = config . Branches [ Config . MasterBranchKey ] . Regex ;
219
- if ( Regex . IsMatch ( chosenBranch . Name . FriendlyName , developBranchRegex , RegexOptions . IgnoreCase ) )
219
+ if ( Regex . IsMatch ( chosenBranch . Name . Friendly , developBranchRegex , RegexOptions . IgnoreCase ) )
220
220
{
221
221
// Normally we would not expect this to happen but for safety we add a check
222
222
if ( config . Branches [ Config . DevelopBranchKey ] . Increment !=
@@ -228,7 +228,7 @@ private static BranchConfig ChooseMasterOrDevelopIncrementStrategyIfTheChosenBra
228
228
} ;
229
229
}
230
230
}
231
- else if ( Regex . IsMatch ( chosenBranch . Name . FriendlyName , masterBranchRegex , RegexOptions . IgnoreCase ) )
231
+ else if ( Regex . IsMatch ( chosenBranch . Name . Friendly , masterBranchRegex , RegexOptions . IgnoreCase ) )
232
232
{
233
233
// Normally we would not expect this to happen but for safety we add a check
234
234
if ( config . Branches [ Config . MasterBranchKey ] . Increment !=
0 commit comments