From 590030485744e54b46be497312463888c2d8165e Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 31 Mar 2024 13:20:24 +0200 Subject: [PATCH] Fix linting issues --- src/{GitHub.psd1 => manifest.psd1} | 0 tools/utilities/GHAPI.ps1 | 4 ++-- tools/utilities/GitHubAPI.ps1 | 13 +------------ 3 files changed, 3 insertions(+), 14 deletions(-) rename src/{GitHub.psd1 => manifest.psd1} (100%) diff --git a/src/GitHub.psd1 b/src/manifest.psd1 similarity index 100% rename from src/GitHub.psd1 rename to src/manifest.psd1 diff --git a/tools/utilities/GHAPI.ps1 b/tools/utilities/GHAPI.ps1 index 3e9d36477..22de92de1 100644 --- a/tools/utilities/GHAPI.ps1 +++ b/tools/utilities/GHAPI.ps1 @@ -11,14 +11,14 @@ $GHToken = 'ABC123' $GHAPIBaseURI = 'https://api.github.com' -Function Get-GHActionRuns { +Function Get-GHActionRun { [CmdletBinding()] param () # API Reference # https://docs.github.com/en/rest/reference/actions#list-workflow-runs-for-a-repository $APICall = @{ - Uri = "$GHRepoURI/repos/$GHOwner/$GHRepo/actions/runs" + Uri = "$GHAPIBaseURI/repos/$GHOwner/$GHRepo/actions/runs" Headers = @{ Authorization = "token $GHToken" 'Content-Type' = 'application/json' diff --git a/tools/utilities/GitHubAPI.ps1 b/tools/utilities/GitHubAPI.ps1 index fcb166d65..2dc4fcb99 100644 --- a/tools/utilities/GitHubAPI.ps1 +++ b/tools/utilities/GitHubAPI.ps1 @@ -1,6 +1,6 @@ $APIDocURI = 'https://raw.githubusercontent.com/github/rest-api-description/main' $Bundled = '/descriptions/api.github.com/api.github.com.json' -$Dereferenced = 'descriptions/api.github.com/dereferenced/api.github.com.deref.json' +# $Dereferenced = 'descriptions/api.github.com/dereferenced/api.github.com.deref.json' $APIDocURI = $APIDocURI + $Bundled $response = Invoke-RestMethod -Uri $APIDocURI -Method Get @@ -40,15 +40,4 @@ $response.paths.$path.$method.responses # -> Could $response.paths.$path.$method.responses.'200'.content.'application/json'.schema # -> OutputType qualifyer $response.paths.$path.$method.responses.'200'.content.'application/json'.schema.items # -> OutputType -$response.components.schemas.PSobject.Properties | ForEach-Object { - [pscustomobject]@{ - Name ame - Titlee.title - Typelype - Properties = $_.Value.properties - Requiredlue.required - } -} - - $response.components.schemas.'issue-comment' | ConvertTo-Json