diff --git a/azure-devops-sample/.pipelines/scripts/Generate-Connections.ps1 b/azure-devops-sample/.pipelines/scripts/Generate-Connections.ps1 index 50902ef..b82d94a 100644 --- a/azure-devops-sample/.pipelines/scripts/Generate-Connections.ps1 +++ b/azure-devops-sample/.pipelines/scripts/Generate-Connections.ps1 @@ -92,6 +92,10 @@ Function Get-FunctionConnections { if ($function -match "(Invoke url)") { $function | select-string -Pattern "Invoke url:" -SimpleMatch | ForEach-Object { + # Anonymous functions do not have the ?code=xxx suffix + if (-not($line.contains('code'))) { + $line += '?' + } $line = $_.Line -replace '\s', '' $name = [Regex]::Matches($line, "(?<=api\/)(.*)(?=\?)") $trigger = [Regex]::Matches($line, "(?<=url:)(.*)(?=\?)")