Skip to content

Commit 47857f1

Browse files
committed
improve get alerts function
1 parent 5b095f7 commit 47857f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ runs:
4141
} | ConvertTo-Json
4242
4343
# Retrieve all alerts and add them to an array
44-
$page = 1
45-
$get_uri = "https://api.github.com/repos/$env:OWNER/$env:PROJECT_NAME/code-scanning/alerts?state=open&page={0}&per_page=$env:ALERTS_PER_PAGE"
4644
function Get-AllAlerts {
45+
$page = 1
4746
$array_of_all_alerts = @()
47+
$get_uri = "https://api.github.com/repos/$env:OWNER/$env:PROJECT_NAME/code-scanning/alerts?state=open&page={0}&per_page=$env:ALERTS_PER_PAGE"
4848
4949
do {
5050
$array_of_alerts_indexes = Invoke-RestMethod -Method GET -Header $headers -URI $($get_uri -f $page)

0 commit comments

Comments
 (0)