forked from Azure/azure-rest-api-specs
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into jacktn/test-correct-filter-2
- Loading branch information
Showing
941 changed files
with
145,500 additions
and
6,224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Protected Files | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
protected-files: | ||
name: Protected Files | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
# Required since "HEAD^" is passed to Get-ChangedFiles | ||
fetch-depth: 2 | ||
|
||
- name: Detect changes to protected files | ||
run: | | ||
. eng/scripts/ChangedFiles-Functions.ps1 | ||
$protectedFiles = @("package.json", "package-lock.json") | ||
$changedFiles = @(Get-ChangedFiles -baseCommitish HEAD^ -targetCommitish HEAD -diffFilter "") | ||
$matchedFiles = @($protectedFiles | Where-Object { $changedFiles -contains $_}) | ||
if ($matchedFiles.Count -gt 0) { | ||
foreach ($file in $matchedFiles) { | ||
Write-Output "::error file=$file::File '$file' should only be updated by the Azure SDK team. If intentional, the PR may be merged by the Azure SDK team via bypassing the branch protections." | ||
} | ||
exit 1 | ||
} | ||
else { | ||
Write-Output "::notice::No changes to protected files: [$($protectedFiles -join ', ')]" | ||
} | ||
shell: pwsh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<# | ||
.DESCRIPTION | ||
Returns the suppressions for a tool applicable to a path. Walks up the directory tree to find all files named | ||
"suppressions.yaml", parses and validates the contents, and returns the suppressions matching the tool and path. | ||
Suppressions are ordered by file (closest to path is first), then within the file (closest to top is first). | ||
.PARAMETER Tool | ||
Name of tool. Matched against property "tool" in suppressions.yaml. | ||
.PARAMETER Path | ||
Path to file or directory under analysis. | ||
.OUTPUTS | ||
Hashtable[] | ||
Array of suppressions matching tool and path (may be empty). See the "get-suppressions" tool for the definition | ||
of the suppression object. | ||
#> | ||
function Get-Suppressions { | ||
param ( | ||
[string]$Tool, | ||
[string]$Path | ||
) | ||
|
||
# -NoEnumerate to prevent single-element arrays from being collapsed to a single object | ||
# -AsHashtable is closer to raw JSON than PSCustomObject | ||
$suppressions = npm exec --no -- get-suppressions $Tool $Path | ConvertFrom-Json -NoEnumerate -AsHashtable | ||
|
||
if ($LASTEXITCODE -ne 0) { | ||
throw "Failure running 'npm exec get-suppressions'" | ||
} | ||
|
||
return $suppressions; | ||
} | ||
|
||
<# | ||
.DESCRIPTION | ||
Returns the first suppression for a tool applicable to a path. Walks up the directory tree to find all files named | ||
"suppressions.yaml", parses and validates the contents, and returns the first suppression matching the tool and path. | ||
Suppressions are ordered by file (closest to path is first), then within the file (closest to top is first). | ||
.PARAMETER Tool | ||
Name of tool. Matched against property "tool" in suppressions.yaml. | ||
.PARAMETER Path | ||
Path to file or directory under analysis. | ||
.OUTPUTS | ||
Hashtable | ||
First suppressions matching tool and path (may be null). See the "get-suppressions" tool for the definition | ||
of the suppression object. | ||
#> | ||
function Get-Suppression { | ||
param ( | ||
[string]$Tool, | ||
[string]$Path | ||
) | ||
|
||
$suppressions = @(Get-Suppressions $Tool $Path) | ||
return $suppressions ? $suppressions[0] : $null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...reStackHCI.StackHCIVM.Management/examples/2024-05-01-preview/AttestationStatuses_Get.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2024-05-01-preview", | ||
"resourceUri": "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"name": "default", | ||
"type": "Microsoft.AzureStackHCI/virtualMachineInstances/AttestationStatus", | ||
"id": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/attestationStatus/default", | ||
"properties": { | ||
"attestSecureBootEnabled": "Disabled", | ||
"attestationCertValidated": "Invalid", | ||
"bootIntegrityValidated": "Invalid", | ||
"errorMessage": "Attestation token has invalid signature", | ||
"healthStatus": "Unhealthy", | ||
"linuxKernelVersion": "1.0.0.0", | ||
"timestamp": "2023/11/10 9:48" | ||
} | ||
} | ||
} | ||
}, | ||
"operationId": "AttestationStatuses_Get", | ||
"title": "GetAttestationStatus" | ||
} |
Oops, something went wrong.