Skip to content

Commit 8dfde66

Browse files
authored
fix array cast (microsoft#974)
Fixes microsoft#973 The fix can best be illustrated by running this code: ```powershell @('[]' | ConvertFrom-Json).Count @('[{"a":"1"}]' | ConvertFrom-Json).Count @('[{"a":"1"},{"b":"2"}]' | ConvertFrom-Json).Count ``` Returns: 1, 1, 1 Expected: 0,1,2 Where this: ```powershell ('[]' | ConvertFrom-Json).Count ('[{"a":"1"}]' | ConvertFrom-Json).Count ('[{"a":"1"},{"b":"2"}]' | ConvertFrom-Json).Count ``` Returns: 0,1,2 as expected Co-authored-by: freddydk <[email protected]>
1 parent 0a51a4a commit 8dfde66

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

Actions/Github-Helper.psm1

+1-1
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ function GetReleases {
507507
)
508508

509509
Write-Host "Analyzing releases $api_url/repos/$repository/releases"
510-
$releases = @(InvokeWebRequest -Headers (GetHeader -token $token) -Uri "$api_url/repos/$repository/releases" | ConvertFrom-Json)
510+
$releases = InvokeWebRequest -Headers (GetHeader -token $token) -Uri "$api_url/repos/$repository/releases" | ConvertFrom-Json
511511
if ($releases.Count -gt 1) {
512512
# Sort by SemVer tag
513513
try {

RELEASENOTES.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Note that when using the preview version of AL-Go for GitHub, we recommend you U
1212
- Support release branches that start with releases/
1313
- Issue 870 Improve Error Handling when CLI is missing
1414
- Issue 889 CreateRelease and IncrementVersionNumber workflow did not handle wild characters in `appFolders`, `testFolders` or `bcptTestFolders` settings.
15+
- Issue 973 Prerelease is not used for deployment
1516

1617
### Build modes
1718
AL-Go ships with Default, Translated and Clean mode out of the box. Now you can also define custom build modes in addition to the ones shipped with AL-Go. This allows you to define your own build modes, which can be used to build your apps in different ways. By default, a custom build mode will build the apps similarly to the Default mode but this behavior can be overridden in e.g. script overrides in your repository.

e2eTests/e2eTestHelper.psm1

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function Add-PropertiesToJsonFile {
6666
$headers = GetHeader -token $token
6767
Write-Host "Get Previous runs"
6868
$url = "https://api.github.com/repos/$repository/actions/runs"
69-
$previousrunids = @(InvokeWebRequest -Method Get -Headers $headers -Uri $url -retry | ConvertFrom-Json).workflow_runs | Where-Object { $_.event -eq 'push' } | Select-Object -ExpandProperty id
69+
$previousrunids = (InvokeWebRequest -Method Get -Headers $headers -Uri $url -retry | ConvertFrom-Json).workflow_runs | Where-Object { $_.event -eq 'push' } | Select-Object -ExpandProperty id
7070
if ($previousrunids) {
7171
Write-Host "Previous runs: $($previousrunids -join ', ')"
7272
}
@@ -517,7 +517,7 @@ function MergePRandPull {
517517
Write-Host "Get Previous runs"
518518
$headers = GetHeader -token $token
519519
$url = "https://api.github.com/repos/$repository/actions/runs"
520-
$previousrunids = @(InvokeWebRequest -Method Get -Headers $headers -Uri $url -retry | ConvertFrom-Json).workflow_runs | Where-Object { $_.event -eq 'push' } | Select-Object -ExpandProperty id
520+
$previousrunids = (InvokeWebRequest -Method Get -Headers $headers -Uri $url -retry | ConvertFrom-Json).workflow_runs | Where-Object { $_.event -eq 'push' } | Select-Object -ExpandProperty id
521521
if ($previousrunids) {
522522
Write-Host "Previous runs: $($previousrunids -join ', ')"
523523
}

0 commit comments

Comments
 (0)