Skip to content

Commit

Permalink
Fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusStorhaug committed Mar 31, 2024
1 parent 6485bd8 commit 5900304
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions tools/utilities/GHAPI.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
13 changes: 1 addition & 12 deletions tools/utilities/GitHubAPI.ps1
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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

0 comments on commit 5900304

Please sign in to comment.