Skip to content

Commit

Permalink
Release utility fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderSehr committed Sep 5, 2023
1 parent 3755d2a commit 40f1a74
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions utilities/tools/Get-FormattedGitHubRelease.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function Get-FormattedGitHubRelease {
$contributors += $matchContributor.Value
}
$foundCategories = $categories | Select-Object -Unique
$foundContributors = $contributors | Select-Object -Unique
$foundContributors = $contributors | Where-Object { -not [String]::IsNullOrEmpty($_) } | Select-Object -Unique

$newContributors = @()
foreach ($line in $newContributorsContent) {
Expand Down Expand Up @@ -159,10 +159,14 @@ function Get-FormattedGitHubRelease {
Authorization = "Bearer $PersonalAccessToken"
}
}
$response = Invoke-RestMethod @requestInputObject
$contributorName = $response.name
$contributorNames += $contributorName + ', '
$output += ('| {0} | {1} |' -f $contributorHandle, $contributorName)
try {
$response = Invoke-RestMethod @requestInputObject
$contributorName = $response.name
$contributorNames += $contributorName + ', '
$output += ('| {0} | {1} |' -f $contributorHandle, $contributorName)
} catch {
Write-Error ("Failed for [$contributor]. Error: $_")
}
}

$output += ''
Expand Down

0 comments on commit 40f1a74

Please sign in to comment.