functions/internal/Get-DefaultBranch.ps1
function Get-DefaultBranch{ param( [Parameter(Mandatory = $false)] [string]$Ref ) process{ if($null -eq $Ref -or $Ref -eq ''){ $Ref = Get-CustomerConfig -XPath "//branch[@name='defaulBranch']//@value" if($null -eq $Ref -or $Ref -eq ''){ $Ref = 'master' } } $Ref } } |