New Snyk overview

This commit is contained in:
Jurjen Ladenius
2023-09-01 15:11:49 +02:00
parent 1d2a40ba50
commit bc24e238d6
4 changed files with 106 additions and 8 deletions

View File

@@ -10,7 +10,8 @@ class Repository {
[string] $LastPRUrl = ""
}
$fileName = "c:\temp\2023-05-03 repositories.csv"
[string] $date = Get-Date -Format "yyyy-MM-dd HHmm"
$fileName = ".\$date repositories.csv"
Write-Host "========================================================================================================================================================================"
Write-Host "Creating repository overview."
@@ -29,12 +30,16 @@ foreach ($repo in $repos)
$repository.IsDisabled = $repo.isDisabled
$repository.WebUrl = $repo.webUrl
$lastPr = az repos pr list --project "survey software" --repository $repo.name --organization "https://dev.azure.com/effectory/" --status all --top 1 | ConvertFrom-Json | Select-Object
if ($true -ne $repo.isDisabled)
{
$lastPr = az repos pr list --project "survey software" --repository $repo.name --organization "https://dev.azure.com/effectory/" --status all --top 1 | ConvertFrom-Json | Select-Object
if ($lastPr) {
$repository.LastPRDate = $lastPr.creationDate
$repository.LastPRName = $lastPr.title
$repository.LastPRUrl = $lastPr.url
if ($lastPr)
{
$repository.LastPRDate = $lastPr.creationDate
$repository.LastPRName = $lastPr.title
$repository.LastPRUrl = $lastPr.url
}
}
$Result += $repository