Skip to content

Commit

Permalink
chore: Update automation scripts for Glarysoft.GlaryUtilities and Log…
Browse files Browse the repository at this point in the history
…itech.OptionsPlus
  • Loading branch information
Utesgui committed Apr 29, 2024
1 parent 659b40d commit f6b4e37
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
3 changes: 1 addition & 2 deletions Scripts/Update-Glarysoft.GlaryUtilities.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ else {
$ExistingOpenPRs = gh pr list --search "$($wingetPackage) $($latestVersion) in:title draft:false" --state 'open' --json 'title,url' --repo 'microsoft/winget-pkgs' | ConvertFrom-Json
$ExistingMergedPRs = gh pr list --search "$($wingetPackage) $($latestVersion) in:title draft:false" --state 'merged' --json 'title,url' --repo 'microsoft/winget-pkgs' | ConvertFrom-Json

$ExistingPRs = $ExistingOpenPRs,$ExistingMergedPRs

$ExistingPRs = @($ExistingOpenPRs) + @($ExistingMergedPRs)
# TODO Check if PR is already merged, if so exit

# TODO if PR from us is already open, update PR with new version
Expand Down
3 changes: 1 addition & 2 deletions Scripts/Update-Logitech.OptionsPlus.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ else {
$ExistingOpenPRs = gh pr list --search "$($wingetPackage) $($latestVersion) in:title draft:false" --state 'open' --json 'title,url' --repo 'microsoft/winget-pkgs' | ConvertFrom-Json
$ExistingMergedPRs = gh pr list --search "$($wingetPackage) $($latestVersion) in:title draft:false" --state 'merged' --json 'title,url' --repo 'microsoft/winget-pkgs' | ConvertFrom-Json

$ExistingPRs = $ExistingOpenPRs,$ExistingMergedPRs

$ExistingPRs = @($ExistingOpenPRs) + @($ExistingMergedPRs)
# TODO Check if PR is already merged, if so exit

# TODO if PR from us is already open, update PR with new version
Expand Down
3 changes: 1 addition & 2 deletions Scripts/Update-Loupedeck.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ if ($fullDownloadURLResponse.StatusCode -ne 200) {
$ExistingOpenPRs = gh pr list --search "$($wingetPackage) $($latestVersion) in:title draft:false" --state 'open' --json 'title,url' --repo 'microsoft/winget-pkgs' | ConvertFrom-Json
$ExistingMergedPRs = gh pr list --search "$($wingetPackage) $($latestVersion) in:title draft:false" --state 'merged' --json 'title,url' --repo 'microsoft/winget-pkgs' | ConvertFrom-Json

$ExistingPRs = $ExistingOpenPRs,$ExistingMergedPRs

$ExistingPRs = @($ExistingOpenPRs) + @($ExistingMergedPRs)
if ($wingetVersions -and ($wingetVersions -notmatch $versionInfo) -and ($ExistingPRs.Count -eq 0)) {
$prMessage = "Update version: $wingetPackage version $versionInfo"
#architecture workaround: https://github.com/microsoft/winget-create/blob/main/doc/update.md
Expand Down
3 changes: 1 addition & 2 deletions Scripts/Update-QFlipper.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ else {
$ExistingOpenPRs = gh pr list --search "$($wingetPackage) $($latestVersion) in:title draft:false" --state 'open' --json 'title,url' --repo 'microsoft/winget-pkgs' | ConvertFrom-Json
$ExistingMergedPRs = gh pr list --search "$($wingetPackage) $($latestVersion) in:title draft:false" --state 'merged' --json 'title,url' --repo 'microsoft/winget-pkgs' | ConvertFrom-Json

$ExistingPRs = $ExistingOpenPRs,$ExistingMergedPRs

$ExistingPRs = @($ExistingOpenPRs) + @($ExistingMergedPRs)
if ($ExistingPRs.Count -gt 0) {
Write-Output "$foundMessage"
$ExistingPRs | ForEach-Object {
Expand Down

0 comments on commit f6b4e37

Please sign in to comment.