File tree Expand file tree Collapse file tree
Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tools/GitHub Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929 $Table = Get-CIPPTable - TableName cacheGitHubReleaseNotes
3030 $PartitionKey = ' GitHubReleaseNotes'
3131 $Filter = " PartitionKey eq '$PartitionKey '"
32- $Rows = Get-CIPPAzDataTableEntity @Table - filter $Filter | Where-Object - Property Timestamp -GT ( Get-Date ).AddHours( -24 )
32+ $Rows = Get-CIPPAzDataTableEntity @Table - filter $Filter
3333
3434 try {
3535 if ($Rows ) {
3636 $Releases = ConvertFrom-Json - InputObject $Rows.GitHubReleases - Depth 10
37- } else {
37+ if ($Releases.releaseTag -notmatch $global :CippVersion ) {
38+ $Releases = $null
39+ }
40+ }
41+
42+ if (-not $Releases ) {
3843 $Releases = Invoke-GitHubApiRequest - Path $ReleasePath
3944 $Releases = $Releases | ForEach-Object {
4045 [ordered ]@ {
4853 commitish = $_.target_commitish
4954 }
5055 }
51-
5256 $Results = @ {
5357 GitHubReleases = [string ](ConvertTo-Json - Depth 10 - InputObject $Releases )
5458 RowKey = [string ]' GitHubReleaseNotes'
You can’t perform that action at this time.
0 commit comments