Merged PR 57105: setup log analytics for sql01 prod

setup log analytics for sql01 prod
This commit is contained in:
Jurjen Ladenius
2025-02-10 10:25:13 +00:00
parent 2b990dae8f
commit 5a99d4d7fa
2 changed files with 568 additions and 2 deletions

View File

@@ -7,6 +7,8 @@ class Repository {
[string] $WebUrl = ""
[string] $LastPRDate = ""
[string] $LastPRName = ""
[string] $LastPRCreatedBy = ""
[string] $LastPRReviewers = ""
[string] $LastPRUrl = ""
}
@@ -29,7 +31,7 @@ foreach ($repo in $repos)
$repository.DefaultBranch = $repo.defaultBranch
$repository.IsDisabled = $repo.isDisabled
$repository.WebUrl = $repo.webUrl
if ($true -ne $repo.isDisabled)
{
$lastPr = az repos pr list --project "survey software" --repository $repo.name --organization "https://dev.azure.com/effectory/" --status completed --top 1 | ConvertFrom-Json | Select-Object
@@ -39,7 +41,9 @@ foreach ($repo in $repos)
$repository.LastPRDate = $lastPr.creationDate
$repository.LastPRName = $lastPr.title
$repository.LastPRUrl = $lastPr.url
}
$repository.LastPRCreatedBy = $lastPr.createdBy.displayName
$repository.LastPRReviewers = $lastPr.reviewers | join-string -property displayName -Separator ','
}
}
$Result += $repository