File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 5050 - id : update
5151 name : " Update the dependency versions"
5252 shell : pwsh
53- run : ./src/scripts/Update-Dependencies.ps1
53+ run : ./src/scripts/Update-Dependencies.ps1 -AuthToken $env:GITHUB_TOKEN
54+ env :
55+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5456
5557 - if : steps.update.outputs.has-changes == 'true' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
5658 name : " Create a PR"
Original file line number Diff line number Diff line change 44#>
55param (
66 $SourceRoot = " $PSScriptRoot /../.." ,
7- $GradleProperties = " $SourceRoot /gradle.properties"
7+ $GradleProperties = " $SourceRoot /gradle.properties" ,
8+ [string ] $AuthToken = $null
89)
910
1011Set-StrictMode - Version Latest
@@ -29,9 +30,18 @@ function ReadCurrentVersions
2930 }
3031}
3132
33+ $requestHeaders = if ($AuthToken ) {
34+ @ { ' Authorization' = " Bearer $AuthToken " }
35+ } else {
36+ $null
37+ }
38+
3239$psScriptAnalyzer = Invoke-RestMethod `
33- ' https://api.github.com/repos/PowerShell/PSScriptAnalyzer/releases?per_page=1'
34- $pses = Invoke-RestMethod ' https://api.github.com/repos/PowerShell/PowerShellEditorServices/releases?per_page=1'
40+ - Headers $requestHeaders `
41+ ' https://api.github.com/repos/PowerShell/PSScriptAnalyzer/releases?per_page=1'
42+ $pses = Invoke-RestMethod `
43+ - Headers $requestHeaders `
44+ ' https://api.github.com/repos/PowerShell/PowerShellEditorServices/releases?per_page=1'
3545
3646function ReadLatestVersions
3747{
You can’t perform that action at this time.
0 commit comments