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 50
50
- id : update
51
51
name : " Update the dependency versions"
52
52
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 }}
54
56
55
57
- if : steps.update.outputs.has-changes == 'true' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
56
58
name : " Create a PR"
Original file line number Diff line number Diff line change 4
4
#>
5
5
param (
6
6
$SourceRoot = " $PSScriptRoot /../.." ,
7
- $GradleProperties = " $SourceRoot /gradle.properties"
7
+ $GradleProperties = " $SourceRoot /gradle.properties" ,
8
+ [string ] $AuthToken = $null
8
9
)
9
10
10
11
Set-StrictMode - Version Latest
@@ -29,9 +30,18 @@ function ReadCurrentVersions
29
30
}
30
31
}
31
32
33
+ $requestHeaders = if ($AuthToken ) {
34
+ @ { ' Authorization' = " Bearer $AuthToken " }
35
+ } else {
36
+ $null
37
+ }
38
+
32
39
$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'
35
45
36
46
function ReadLatestVersions
37
47
{
You can’t perform that action at this time.
0 commit comments