Skip to content

Commit d0a85ed

Browse files
committed
fix create repo
1 parent a743f7f commit d0a85ed

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tools/GitHub/Invoke-ExecGitHubAction.ps1

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,8 @@ function Invoke-ExecGitHubAction {
6363
'CreateRepo' {
6464
try {
6565
Write-Information "Creating repository '$($SplatParams.Name)'"
66-
Write-Information ($SplatParams | ConvertTo-Json -Depth 10)
6766
$Repo = New-GitHubRepo @SplatParams
68-
if ($Results.id) {
67+
if ($Repo.id) {
6968
$Table = Get-CIPPTable -TableName CommunityRepos
7069
$RepoEntity = @{
7170
PartitionKey = 'CommunityRepos'
@@ -83,7 +82,7 @@ function Invoke-ExecGitHubAction {
8382
Add-CIPPAzDataTableEntity @Table -Entity $RepoEntity -Force | Out-Null
8483

8584
$Results = @{
86-
resultText = "Repository '$($Results.name)' created"
85+
resultText = "Repository '$($Repo.name)' created"
8786
state = 'success'
8887
}
8988
}

Modules/CippExtensions/Public/GitHub/New-GitHubRepo.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@ function New-GitHubRepo {
5353
}
5454
} catch { }
5555
if ($PSCmdlet.ShouldProcess("Create repository '$Name'")) {
56-
return (Invoke-GitHubApiRequest -Path $Path -Method POST -Body $Body)
56+
Invoke-GitHubApiRequest -Path $Path -Method POST -Body $Body
5757
}
5858
}

0 commit comments

Comments
 (0)