File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -210,17 +210,21 @@ foreach ($version in $lastFewVersions) {
210210 Invoke-NativeCommand gh pr create -- title " $title " -- body " $body " -- repo microsoft/ winget- pkgs -- base master -- head Rust- Winget- Bot:rust- $version - $toolchainLower
211211 }
212212}
213- $closedPRs = Invoke-NativeCommand gh pr list -- author " Rust-Winget-Bot" -- repo " microsoft/winget-pkgs" -- state= closed -- limit 10
214- | Foreach-Object {((($_ -split ' \t' )[2 ]) -split ' :' )[1 ]};
213+ if ($initialSetupExecuted ) {
214+ $closedPRs = Invoke-NativeCommand gh pr list -- author " Rust-Winget-Bot" -- repo " microsoft/winget-pkgs" -- state= closed -- limit 10
215+ | Foreach-Object {((($_ -split ' \t' )[2 ]) -split ' :' )[1 ]};
215216
216- $branches = Invoke-NativeCommand git ls- remote -- heads https:// github.com / Rust- Winget- Bot/ winget- pkgs.git
217- | Select-String - Pattern " refs/heads/(.+$)"
218- | ForEach-Object { $_.Matches [0 ].Groups[1 ].Value }
217+ $branches = Invoke-NativeCommand git ls- remote -- heads https:// github.com / Rust- Winget- Bot/ winget- pkgs.git
218+ | Select-String - Pattern " refs/heads/(.+$)"
219+ | ForEach-Object { $_.Matches [0 ].Groups[1 ].Value }
219220
220- foreach ($pr in $closedPRs ) {
221- if ($branches.Contains ($pr )) {
222- Invoke-NativeCommand git push https:// github.com / Rust- Winget- Bot/ winget- pkgs.git - d $pr
221+ foreach ($pr in $closedPRs ) {
222+ if ($branches.Contains ($pr )) {
223+ Invoke-NativeCommand git push origin - d $pr
224+ }
223225 }
224226}
225227
226228
229+
230+
You can’t perform that action at this time.
0 commit comments