Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
164 commits
Select commit Hold shift + click to select a range
a7c1954
New version: EarendilWorks.pi version 0.80.7 (#402331)
spectopo Jul 14, 2026
b6b54ac
New version: Loom.Loom version 0.361.0 (#402338)
spectopo Jul 14, 2026
67ee10f
New version: LuisPater.CLIProxyAPI version 7.2.75 (#402339)
spectopo Jul 14, 2026
6e5ecbd
New version: TragicCode.BuslyCLI version 0.64.19 (#402340)
TraGicCode Jul 14, 2026
61c4bbe
New version: Microsoft.RemoteDesktopClient version 1.2.7279.0 (#402341)
spectopo Jul 14, 2026
54645aa
New version: Microsoft.WindowsApp version 2.0.1247.0 (#402342)
spectopo Jul 14, 2026
8c5b1b8
Update: Readdle.Spark version 3.30.1 (3.30.1.139922) (#402356)
spectopo Jul 14, 2026
c326ded
New version: Snowflake.SnowflakeCLI version 3.22.1.0 (#402357)
spectopo Jul 14, 2026
dbe3398
New version: Sourcegraph.Amp version 0.0.1784046309-g5bdc66 (#402358)
spectopo Jul 14, 2026
e1a7c4e
Automatic Waiver Addition for PR 387356 (#402413)
wingetbot Jul 14, 2026
2851db1
New package: goldjg.cARL version 0.4.2 (#396526)
goldjg Jul 14, 2026
bd8b471
Microsoft.DotNet.DesktopRuntime.10 version 10.0.10 (#402364)
dotnet-winget-bot Jul 14, 2026
1210187
Microsoft.DotNet.AspNetCore.8 version 8.0.29 (#402348)
dotnet-winget-bot Jul 14, 2026
7ed4a0e
Microsoft.DotNet.AspNetCore.10 version 10.0.10 (#402360)
dotnet-winget-bot Jul 14, 2026
a45ac85
Microsoft.DotNet.HostingBundle.10 version 10.0.10 (#402361)
dotnet-winget-bot Jul 14, 2026
1f6b546
Microsoft.DotNet.Runtime.8 version 8.0.29 (#402346)
dotnet-winget-bot Jul 14, 2026
06deda4
Microsoft.DotNet.SDK.10 version 10.0.302 (#402365)
dotnet-winget-bot Jul 14, 2026
88a5e3e
Microsoft.DotNet.AspNetCore.9 version 9.0.18 (#402345)
dotnet-winget-bot Jul 14, 2026
3131829
Microsoft.DotNet.SDK.Preview version 11.0.100-preview.6.26359.118 (#4…
dotnet-winget-bot Jul 14, 2026
7345bc2
New package: hidecode365.WinLauncher version 0.1.0 (#392917)
hidecode365 Jul 14, 2026
1289472
New version: polrivero.GitHubDesktopPlus version 3.6.2-r1 (#397792)
pol-rivero Jul 14, 2026
227c349
Update: KDE.Chessament version 0.1 (741) (#402336)
spectopo Jul 14, 2026
9a589ae
New version: WXRIW.Lyricify version 4.3.52 (#402362)
spectopo Jul 14, 2026
a7e9afe
New version: WXRIW.Lyricify.Lite version 1.2.5 (#402363)
spectopo Jul 14, 2026
1d46695
New version: XinTaoFei.Codeg version 0.20.3 (#402366)
spectopo Jul 14, 2026
ebbd9e2
GitHub.Copilot.Prerelease version v1.0.71-1 (#402368)
copilot-cli-winget-bot Jul 14, 2026
6a522d2
New version: SmokeTurner.Vouch version 2026.7.2 (#402369)
vouch-bot Jul 14, 2026
8224cfb
New version: Chromium.ChromeDriver version 150.0.7871.124 (#402374)
UnownBot Jul 14, 2026
eece5a8
New package: BenjaminLarsson.Rtl_433.MSVC version 25.02 (#396529)
rc-chuah Jul 14, 2026
b3a18e9
New package: martona.clipp version 1.2.1.123 (#392933)
martona Jul 14, 2026
ad211dd
Bump version: OCBase.OCCT.Personal version 17.0.9.0 (#402244)
Dragon1573 Jul 14, 2026
ef299bb
Add Laker.EasyPostman version 6.0.11 (#396755)
lakernote Jul 14, 2026
a3d92b0
Remove version: Google.Chrome.EXE version 139.0.7258.155 (#402406)
UnownBot Jul 14, 2026
320619b
Remove version: Google.Chrome.EXE version 138.0.7204.169 (#402410)
UnownBot Jul 14, 2026
3ac4dfe
New package: b7s.Plume version 0.1.0 (#393211)
b7s Jul 14, 2026
2290f7a
New package: martona.WM_NIGHT version 0.1.1.2 (#393605)
martona Jul 14, 2026
b1b90d5
Microsoft.DotNet.SDK.10 version 10.0.110 (#402367)
dotnet-winget-bot Jul 14, 2026
f79077f
Microsoft.DotNet.SDK.8 version 8.0.423 (#402354)
dotnet-winget-bot Jul 14, 2026
1be0289
New version: Mozilla.Firefox.sk version 152.0.6 (#402251)
spectopo Jul 14, 2026
3008d48
Microsoft.DotNet.SDK.9 version 9.0.119 (#402353)
dotnet-winget-bot Jul 14, 2026
311d750
Microsoft.DotNet.SDK.8 version 8.0.129 (#402355)
dotnet-winget-bot Jul 14, 2026
a707e6b
Microsoft.DotNet.SDK.9 version 9.0.316 (#402351)
dotnet-winget-bot Jul 14, 2026
fb93ce0
New version: Matteo842.SaveState version 2.9 (#402327)
Matteo842 Jul 14, 2026
694e244
New version: RafalZG.ClaudeSessionsSidekick version 1.0.5 (#402295)
RafalZG Jul 14, 2026
352f9c6
New version: voidtools.Everything.Beta version 1.5.0.1416b (#402375)
krystofkrticka Jul 14, 2026
377cc1f
New version: blacktop.ipsw 3.1.703 (#402376)
blacktop Jul 14, 2026
13b8f77
New version: TJSmith.Anodizer version 0.20.0 (#402380)
tj-smith47 Jul 14, 2026
1b31ecc
New version: obot-platform.obot version v0.23.4 (#402381)
acorn-io-bot Jul 14, 2026
bda45dc
New version: ReadAI.ReadAI version 1.28.0 (#402392)
spectopo Jul 14, 2026
780f3e8
Add SciScope.SciScopeTUI version 0.1.2 (#393345)
Timcai06 Jul 14, 2026
bcac1e5
Add version: DeskRipple.DeskRipple version 0.1.2 (#393272)
mmiscs5 Jul 14, 2026
03418f5
New version: Mozilla.Firefox.pt-PT version 152.0.6 (#402242)
spectopo Jul 14, 2026
cffe78a
New version: Mozilla.Firefox.th version 152.0.6 (#402262)
spectopo Jul 14, 2026
7de9050
New version: GodotEngine.GodotEngine.Mono version 4.7.1 (#402390)
UnownBot Jul 14, 2026
0b31c35
RClone-Manager.rclone-manager version v0.3.0 (#402393)
Hakanbaban53 Jul 14, 2026
ff3cae8
New version: icsharpcode.ILSpy version 10.1.1.8388 (#402394)
UnownBot Jul 14, 2026
448ab72
New package: MotionLabSystems.C3Dserver version 1.204.8.1 (#389658)
PckgrMitch Jul 14, 2026
a32b164
MiguelAngelRamirez.MyAgents version 0.1.0 (#396812)
miguelangelxramirez Jul 14, 2026
c6c7e24
New package: kulkamKakarot.DriveLens version 1.0.0 (#396779)
kulkamKakarot Jul 14, 2026
699f555
New version: can1357.oh-my-pi version 16.5.1 (#402382)
spectopo Jul 14, 2026
b0d227d
Microsoft.VisualStudio.2019.Enterprise version 16.11.58 (#402397)
jlee671 Jul 14, 2026
2b028f0
Microsoft.VisualStudio.2019.Professional version 16.11.58 (#402398)
jlee671 Jul 14, 2026
af7c811
New version: QuotationFactory.QFC version 0.0.1-alpha (#396961)
GersonDias Jul 14, 2026
30f2459
New package: KristianKiel.BILLEVO version 3.7.4 (#396830)
KristianApp Jul 14, 2026
21f36ef
Add words that are failing spelling (#398835)
Trenly Jul 14, 2026
20e7d27
Remove `Validation-Guide` on `Validation-Completed` (#401362)
mdanish-kh Jul 14, 2026
a677122
Fix inconsistent ids in some policy files (#383922)
KarbitsCode Jul 14, 2026
936ffd2
Move GitHub and File Operation functionality to Modules (#380522)
Trenly Jul 14, 2026
1fcffc8
New version: GitHub.GitHubDesktop version 3.6.3 (#402386)
spectopo Jul 14, 2026
8089261
Microsoft.VisualStudio.Enterprise version 18.8.0 (#402401)
jlee671 Jul 14, 2026
72f821c
Microsoft.VisualStudio.Professional version 18.8.0 (#402403)
jlee671 Jul 14, 2026
ac19c24
Microsoft.VisualStudio.Community version 18.8.0 (#402404)
jlee671 Jul 14, 2026
d92572d
New version: Microsoft.SafetyScanner version 1.455.143.0 (#402417)
UnownBot Jul 14, 2026
368fade
New version: JanDeDobbeleer.OhMyPosh version 29.28.0 (#402028)
JanDeDobbeleer Jul 14, 2026
b979423
New package: NetCoreGames.TalesofMajEyal version 1.7.6 (#389271)
denismattos Jul 14, 2026
41b4240
New package: MarkEmbling.Pal version 0.1.0 (#393472)
markembling Jul 14, 2026
3ed4d86
New package: skim-rs.skim version 4.10.0 (#396371)
LoicRiegel Jul 14, 2026
0e33ce4
New package: TP202610017.isw version 0.2.3 (#393620)
Jemisas Jul 14, 2026
abca904
Microsoft.VisualStudio.Enterprise.Insiders version 18.9.12009.208 (#4…
jlee671 Jul 14, 2026
879f4f3
Microsoft.VisualStudio.Professional.Insiders version 18.9.12009.208 (…
jlee671 Jul 14, 2026
4d402e8
Microsoft.VisualStudio.Community.Insiders version 18.9.12009.208 (#40…
jlee671 Jul 14, 2026
174f0bc
Recol.DLSSUpdater version 4.3.2 (#402426)
Recol Jul 14, 2026
c3d1576
Mibuw.miPDFconvert version 1.0.1 (#397226)
Mibuw Jul 14, 2026
a93262b
Update willibrandon.scout to 0.4.5 (#402428)
willibrandon Jul 14, 2026
b6a9c84
New version: nekohy.MeowCLI version 1.4.7 (#400809)
spectopo Jul 14, 2026
16d9e9b
New version: Mozilla.Firefox.en-CA version 152.0.6 (#402171)
spectopo Jul 14, 2026
747678a
KeeperSecurity.KeeperDB version 2.2.0 (#397371)
craiglurey Jul 14, 2026
39aed1d
New version: Mozilla.Firefox.tg version 152.0.6 (#402261)
spectopo Jul 14, 2026
fd15c64
New version: Mozilla.Firefox.tl version 152.0.6 (#402263)
spectopo Jul 14, 2026
9c68c13
New version: Mozilla.Firefox.MSIX version 152.0.6 (#402318)
spectopo Jul 14, 2026
32d5f95
New version: blacktop.ipswd 3.1.703 (#402377)
blacktop Jul 14, 2026
51d0d1c
Microsoft.VisualStudio.BuildTools version 18.8.0 (#402407)
jlee671 Jul 14, 2026
b94e6b1
Microsoft.SQLServerManagementStudio.22 version 22.8.0 (#402412)
jlee671 Jul 14, 2026
4bc3a27
New version: NimbusAgent.Nimbus version 0.20.0 (#402415)
asafgolombek Jul 14, 2026
5815e7a
Microsoft.VisualStudio.Enterprise version 18.7.4 (#402422)
jlee671 Jul 14, 2026
516e6fa
Microsoft.VisualStudio.Professional version 18.7.4 (#402423)
jlee671 Jul 14, 2026
c4f9b6e
Microsoft.VisualStudio.Community version 18.7.4 (#402424)
jlee671 Jul 14, 2026
7caeea8
New version: DavidEngelhart.Termpolis version 1.26.1 (#402430)
spectopo Jul 14, 2026
27a7b4f
New version: Discord.Discord.Canary version 1.0.1041 (#402431)
spectopo Jul 14, 2026
451f97d
New version: Discord.Discord.Canary.arm64 version 1.0.374 (#402432)
spectopo Jul 14, 2026
0ed5c13
New version: Formlabs.PreForm version 3.60.3.641 (#402433)
spectopo Jul 14, 2026
f8993aa
Update: KDE.Minuet version 26.11.70 (1215) (#402438)
spectopo Jul 14, 2026
416a9a2
New version: LuisPater.CLIProxyAPI version 7.2.76 (#402441)
spectopo Jul 14, 2026
162e451
New version: Sovera.Pulse 0.1.3 (#393485)
sovera-dev Jul 14, 2026
621435d
New version: Sovera.Pulse 0.1.4 (#394063)
sovera-dev Jul 14, 2026
4425c20
New version: Sovera.Pulse 0.1.5 (#401755)
sovera-dev Jul 14, 2026
cb84381
New version: Sovera.Pulse 0.1.6 (#401784)
sovera-dev Jul 14, 2026
8225bc6
Microsoft.VisualStudio.2022.Enterprise version 17.14.36 (#402402)
jlee671 Jul 14, 2026
d02cdeb
New package: Glide01.BoxPilot version 1.13.0 (#397399)
Glide01 Jul 14, 2026
24e763c
Microsoft.VisualStudio.2022.Professional version 17.14.36 (#402405)
jlee671 Jul 14, 2026
7a29399
Microsoft.VisualStudio.2022.Community version 17.14.36 (#402408)
jlee671 Jul 14, 2026
3f70e3e
New version: Microsoft.MaliciousSoftwareRemovalTool version 5.143 (#4…
spectopo Jul 14, 2026
fb1148c
New version: Postman.Postman version 12.19.3 (#402444)
spectopo Jul 14, 2026
029aa10
New version: StruisICT.InLook version 0.7.0 (#402457)
Struis112 Jul 14, 2026
22cd060
New package: wenshui330.jy-draftc version 0.1.1 (#394290)
SpecterShell Jul 14, 2026
91a33bf
RikardElofsson.SDXC-copy version 1.0.1 (#397458)
Elof-com Jul 14, 2026
bb00cae
New version: v2matosevic.WinSnipper version 0.5.1 (#393641)
v2matosevic Jul 14, 2026
146676e
New package: Relic.Relic version 1.0.5 (#397611)
jordan-gibbs Jul 14, 2026
cf3306d
New version: RubyInstallerTeam.Ruby.4.0 version 4.0.6-1 (#402445)
spectopo Jul 14, 2026
ddd5309
New version: Superhuman.Superhuman version 1041.0.18 (#402449)
spectopo Jul 14, 2026
7643555
New version: yetone.Alma version 0.0.875 (#402452)
spectopo Jul 14, 2026
efde2f7
New version: SST.OpenCodeDesktop version 1.18.0 (#402456)
UnownBot Jul 14, 2026
fb57010
New version: AbdulazizJHK.ZoomToolkit version 2.1.0 (#402458)
AbdulazizJHK Jul 14, 2026
9bb09d4
New version: pbek.QOwnNotes version 26.7.7 (#402459)
kris6673 Jul 14, 2026
55e4434
Kado.Cin: v0.1.6 (#394300)
AyushVachaspati Jul 14, 2026
76ac4df
New package: mingchen666.Reviva version 0.0.2-beta (#397714)
SpecterShell Jul 14, 2026
09036ae
New version: dprint.dprint version 0.55.2 (#402461)
damn-good-b0t Jul 14, 2026
a5eff4d
New version: openpubkey.opkssh version 0.16.0 (#402462)
damn-good-b0t Jul 14, 2026
7230779
New version: Fly-io.flyctl version 0.4.71 (#402463)
damn-good-b0t Jul 14, 2026
8d07bba
New version: Forkgram.Forkgram version 7.0.1 (#402464)
damn-good-b0t Jul 14, 2026
05c54c6
Automatic update of ChannelCorporation.ChannelTalkforDesktop from 12.…
wingetbot Jul 14, 2026
221bf7b
New package: CrazyFigure.MyTerminal version 0.2.9 (#397762)
SpecterShell Jul 14, 2026
86ce8da
Microsoft.VisualStudio.2022.BuildTools version 17.14.36 (#402409)
jlee671 Jul 14, 2026
d351028
New version: Dilluti0n.DPIBreak version 0.6.2 (#402416)
dilluti0n Jul 14, 2026
214ae70
New version: SST.OpenCodeDesktop version 1.18.1 (#402471)
UnownBot Jul 14, 2026
ab7e0a6
New version: Microsoft.SafetyScanner version 1.455.144.0 (#402474)
UnownBot Jul 14, 2026
6540a80
Dweymouth.Supersonic version 0.22.0 (#402475)
celynw Jul 14, 2026
5672f80
Update: KDE.Minuet version 26.11.70 (1217) (#402477)
spectopo Jul 14, 2026
0f50ce1
New version: Rakuten.Kobo version 4.38.23360 (#402481)
spectopo Jul 14, 2026
90ffb0d
New version: Microsoft.FoundryLocal version 0.10.2.0 (#402479)
baijumeswani Jul 14, 2026
814715d
New version: LuisPater.CLIProxyAPI version 7.2.77 (#402478)
spectopo Jul 14, 2026
714866e
New version: Posit.RStudio version 2026.07.0+139 (#402480)
spectopo Jul 14, 2026
588099b
New version: Sourcegraph.Amp version 0.0.1784060561-g91077d (#402482)
spectopo Jul 14, 2026
a4233e2
New version: legowerewolf.AO3Fetch version 2.1.5 (#402486)
legowerewolf Jul 14, 2026
21e550f
New version: rustty.Rustty version 1.55.0 (#402488)
Aleixenandros Jul 14, 2026
241ee3e
Automatic update of VeyonSolutions.Veyon 4.11.0.0 (#400714)
wingetbot Jul 14, 2026
19db862
New version: SST.opencode version 1.17.19 (#401773)
spectopo Jul 14, 2026
7ea9346
New version: infisical.infisical 0.43.106 (#402491)
maidul98 Jul 14, 2026
94e21dd
New version: Modrinth.ModrinthApp version 0.15.11 (#402492)
UnownBot Jul 14, 2026
8878860
New version: HubDev.HubDev version 1.24.0 (#402495)
wallacemartinss Jul 14, 2026
4995186
New version: Google.ChromeRemoteDesktopHost version 151.0.7922.13 (#4…
spectopo Jul 14, 2026
e089210
Automatic deletion of Logitech.GHUB 2026.3.880543 (#402510)
wingetbot Jul 14, 2026
956c727
New version: Sinew.Enpass version 6.12.3.2605 (#400275)
SpecterShell Jul 15, 2026
3c72bbb
New package: Abdk4Moura.Filament version 0.5.0 (#402487)
Abdk4Moura Jul 15, 2026
8177a68
Automatic update of Codedaptive.MOOTx01 1.0.31 (#402493)
wingetbot Jul 15, 2026
6ef8ea4
New version: v2fly.v2ray-core version 5.51.2 (#402496)
Qusic Jul 15, 2026
8f0456a
New version: can1357.oh-my-pi version 16.5.2 (#402498)
spectopo Jul 15, 2026
840574f
New version: DavidEngelhart.Termpolis version 1.26.2 (#402500)
spectopo Jul 15, 2026
9390757
New version: LunarWerxs.SageThumbs2K version 1.0.1 (#402503)
LunarWerxs Jul 15, 2026
326a118
New version: autobrr.upbrr.gui version 0.2.4 (#402504)
landkatze Jul 15, 2026
052a3c1
Automatic deletion of Argente.DriveCleaner 3.0.9.7 (#402514)
wingetbot Jul 15, 2026
46f69f3
Automatic deletion of Argente.SystemRepair 1.0.8.3 (#402515)
wingetbot Jul 15, 2026
c16d2bc
Automatic deletion of Argente.SoftwareUpdater 1.0.7.8 (#402516)
wingetbot Jul 15, 2026
6b5e796
Automatic deletion of Argente.MalwareCleaner 3.0.8.4 (#402517)
wingetbot Jul 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ bcdboot
checkboxes
cla
clonemedium
Cloudflight
codeowner
codeowners
Contoso
diffs
DISM
dism
distro
dsc
Entra
Esco
ESRP
Expand All @@ -27,6 +29,7 @@ fnt
ftp
github
GPT
HKLM
Homeserver
homeservers
https
Expand Down Expand Up @@ -68,6 +71,8 @@ ranhpa
ranpha
redirector
Redistributables
restsource
rewinged
Runtimes
russellbanks
screenshots
Expand All @@ -81,6 +86,7 @@ Testplan
toolset
Trenly
ttc
UAC
ubuntu
UEFI
unassign
Expand Down
5 changes: 4 additions & 1 deletion .github/policies/labelAdded.validationCompleted.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
id: labelAdded.validationHttpError
id: labelAdded.validationCompleted
name: GitOps.PullRequestIssueManagement
description: Handlers when "Validation-Completed" label is added
owner:
Expand All @@ -11,6 +11,7 @@ configuration:
- description: >-
When the label "Validation-Completed" is added to a pull request and the "Moderator-Approved" label is not present
* Add a reply notifying the issue author
* Remove the Validation-Guide label
if:
- payloadType: Pull_Request
- labelAdded:
Expand All @@ -26,6 +27,8 @@ configuration:
label: Publisher-Verified
- isOpen
then:
- removeLabel:
label: Validation-Guide
- addReply:
reply: >-
The check-in policies require a moderator to approve PRs from the community.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
id: labelAdded.assignIcmUsersAndModerators
id: labelManagement.assignIcmUsersAndModerators
name: GitOps.PullRequestIssueManagement
description: When these labels are added, the ICM Primary and secondary user should be assigned
owner:
Expand Down
107 changes: 107 additions & 0 deletions Tools/Modules/FileOperations/FileOperations.Tests.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
Describe 'FileOperations Module' {
BeforeAll {
$ModulePath = Split-Path -Parent $PSCommandPath
Import-Module (Join-Path $ModulePath 'FileOperations.psd1') -Force
}

Context 'Module Import' {
It 'Should import the module successfully' {
Get-Module 'FileOperations' | Should -Not -BeNullOrEmpty
}

It 'Should export all expected functions' {
$ExportedFunctions = (Get-Module 'FileOperations').ExportedFunctions.Keys
'Initialize-Folder' -in $ExportedFunctions | Should -Be $true
'Invoke-FileCleanup' -in $ExportedFunctions | Should -Be $true
'Request-RemoveItem' -in $ExportedFunctions | Should -Be $true
}
}
}

Describe 'Initialize-Folder' {
It 'Should create a folder and return true when it does not exist' {
$tempRoot = Join-Path -Path ([System.IO.Path]::GetTempPath()) -ChildPath ([System.Guid]::NewGuid().ToString())
$targetFolder = Join-Path -Path $tempRoot -ChildPath 'created'

try {
$result = Initialize-Folder -FolderPath $targetFolder
$result | Should -Be $true
(Test-Path -Path $targetFolder -PathType Container) | Should -Be $true
} finally {
if (Test-Path -Path $tempRoot) { Remove-Item -Path $tempRoot -Recurse -Force -ErrorAction SilentlyContinue }
}
}

It 'Should return true for an existing folder' {
$tempRoot = Join-Path -Path ([System.IO.Path]::GetTempPath()) -ChildPath ([System.Guid]::NewGuid().ToString())
New-Item -Path $tempRoot -ItemType Directory -Force | Out-Null

try {
$result = Initialize-Folder -FolderPath $tempRoot
$result | Should -Be $true
} finally {
if (Test-Path -Path $tempRoot) { Remove-Item -Path $tempRoot -Recurse -Force -ErrorAction SilentlyContinue }
}
}

It 'Should return false when a file exists at the folder path' {
$tempFile = New-TemporaryFile

try {
$result = Initialize-Folder -FolderPath $tempFile.FullName
$result | Should -Be $false
} finally {
if (Test-Path -Path $tempFile.FullName) { Remove-Item -Path $tempFile.FullName -Force -ErrorAction SilentlyContinue }
}
}
}

Describe 'Request-RemoveItem' {
It 'Should remove a file path' {
$tempFile = New-TemporaryFile
Request-RemoveItem -Path $tempFile.FullName
(Test-Path -Path $tempFile.FullName) | Should -Be $false
}

It 'Should remove a directory path recursively' {
$tempRoot = Join-Path -Path ([System.IO.Path]::GetTempPath()) -ChildPath ([System.Guid]::NewGuid().ToString())
$nestedFolder = Join-Path -Path $tempRoot -ChildPath 'nested'
$nestedFile = Join-Path -Path $nestedFolder -ChildPath 'payload.txt'
New-Item -Path $nestedFolder -ItemType Directory -Force | Out-Null
Set-Content -Path $nestedFile -Value 'payload'

Request-RemoveItem -Path $tempRoot
(Test-Path -Path $tempRoot) | Should -Be $false
}

It 'Should be a no-op when path does not exist' {
$missingPath = Join-Path -Path ([System.IO.Path]::GetTempPath()) -ChildPath ([System.Guid]::NewGuid().ToString())
{ Request-RemoveItem -Path $missingPath } | Should -Not -Throw
}
}

Describe 'Invoke-FileCleanup' {
It 'Should remove files and folders in the provided list' {
$tempRoot = Join-Path -Path ([System.IO.Path]::GetTempPath()) -ChildPath ([System.Guid]::NewGuid().ToString())
$tempFolder = Join-Path -Path $tempRoot -ChildPath 'cleanup'
$tempFile = Join-Path -Path $tempRoot -ChildPath 'file.txt'
New-Item -Path $tempFolder -ItemType Directory -Force | Out-Null
New-Item -Path $tempFile -ItemType File -Force | Out-Null

Invoke-FileCleanup -FilePaths @($tempFolder, $tempFile)

(Test-Path -Path $tempFolder) | Should -Be $false
(Test-Path -Path $tempFile) | Should -Be $false

if (Test-Path -Path $tempRoot) { Remove-Item -Path $tempRoot -Recurse -Force -ErrorAction SilentlyContinue }
}

It 'Should not throw when file list is empty' {
{ Invoke-FileCleanup -FilePaths @() } | Should -Not -Throw
}

It 'Should not throw when file list contains missing paths' {
$missingPath = Join-Path -Path ([System.IO.Path]::GetTempPath()) -ChildPath ([System.Guid]::NewGuid().ToString())
{ Invoke-FileCleanup -FilePaths @($missingPath) } | Should -Not -Throw
}
}
54 changes: 54 additions & 0 deletions Tools/Modules/FileOperations/FileOperations.psd1
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#
# Module manifest for module 'FileOperations'
#
# Generated by: Trenly
#
# Generated on: 5/27/2026
#

@{

# Script module or binary module file associated with this manifest.
RootModule = 'FileOperations.psm1'

# Version number of this module.
ModuleVersion = '0.0.1'

# ID used to uniquely identify this module
GUID = '37c15420-b760-4f80-8c52-a154225b867c'

# Author of this module
Author = 'Microsoft Open Source Community'

# Company or vendor of this module
CompanyName = 'Microsoft Corporation'

# Copyright statement for this module
Copyright = 'Copyright (c) Microsoft Corporation. All rights reserved.'

# Description of the functionality provided by this module
Description = 'Shared folder and file operations for winget-pkgs tooling scripts and modules.'

# Functions to export from this module
FunctionsToExport = @(
'Initialize-Folder'
'Request-RemoveItem'
'Invoke-FileCleanup'
)

# Cmdlets to export from this module
CmdletsToExport = @()

# Variables to export from this module
VariablesToExport = '*'

# Aliases to export from this module
AliasesToExport = @()

PrivateData = @{
PSData = @{
LicenseUri = 'https://github.com/microsoft/winget-pkgs/blob/master/LICENSE'
ProjectUri = 'https://github.com/microsoft/winget-pkgs'
}
}
}
73 changes: 73 additions & 0 deletions Tools/Modules/FileOperations/FileOperations.psm1
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
function Initialize-Folder {
param (
[Parameter(Mandatory = $true)]
[String] $FolderPath
)

$FolderPath = [System.IO.Path]::GetFullPath($FolderPath)
if (Test-Path -Path $FolderPath -PathType Container) { return $true }
if (Test-Path -Path $FolderPath) { return $false }

try {
New-Item -Path $FolderPath -ItemType Directory -Force -ErrorAction Stop | Out-Null
return $true
} catch {
return $false
}
}

function Request-RemoveItem {
Param(
[Parameter(Mandatory = $true, Position = 0)]
[string] $Path,
[int] $Retries = 6,
[int] $DelayMs = 250
)

# Check if path exists using .NET
$fileInfo = [System.IO.FileInfo]$Path
$dirInfo = [System.IO.DirectoryInfo]$Path

if (-not ($fileInfo.Exists -or $dirInfo.Exists)) { return }

for ($i = 0; $i -lt $Retries; $i++) {
try {
if ($dirInfo.Exists) {
$dirInfo.Delete($true)
} elseif ($fileInfo.Exists) {
$fileInfo.Delete()
}
return
} catch [System.IO.IOException] {
[GC]::Collect()
[GC]::WaitForPendingFinalizers()
Start-Sleep -Milliseconds $DelayMs
$DelayMs = [Math]::Min(5000, $DelayMs * 2)
} catch {
throw
}
}

Write-Warning "Could not remove file '$Path' after $Retries attempts; it may be in use by another process."
}

function Invoke-FileCleanup {
param (
[Parameter(Mandatory = $true)]
[AllowEmptyString()]
[AllowEmptyCollection()]
[String[]] $FilePaths
)

if (!$FilePaths) { return }
foreach ($path in $FilePaths) {
Write-Debug "Removing $path"
if (Test-Path -Path $path) {
Request-RemoveItem -Path $path
} else {
Write-Warning "Could not remove $path as it does not exist"
}
}
}

Export-ModuleMember -Function @('Initialize-Folder', 'Request-RemoveItem', 'Invoke-FileCleanup')
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
Describe 'YamlCreate.GitHub Module' {
BeforeAll {
# Import the module to test
$ModulePath = Split-Path -Parent $PSCommandPath
Import-Module (Join-Path $ModulePath 'YamlCreate.GitHub.psd1') -Force
}

Context 'Module Import' {
It 'Should import the module successfully' {
Get-Module 'YamlCreate.GitHub' | Should -Not -BeNullOrEmpty
}

It 'Should declare FileOperations as a required module dependency' {
$ModulePath = Split-Path -Parent $PSCommandPath
$manifest = Import-PowerShellDataFile -Path (Join-Path $ModulePath 'YamlCreate.GitHub.psd1')
(@($manifest.RequiredModules) -contains 'FileOperations') | Should -Be $true
}

It 'Should export all expected functions' {
$ExportedFunctions = (Get-Module 'YamlCreate.GitHub').ExportedFunctions.Keys
'Get-Remote' -in $ExportedFunctions | Should -Be $true
'Set-Remote' -in $ExportedFunctions | Should -Be $true
'Find-PullRequest' -in $ExportedFunctions | Should -Be $true
'Get-PrTemplate' -in $ExportedFunctions | Should -Be $true
}
}

Context 'wingetUpstream Variable' {
It 'Should have correct value for wingetUpstream' {
$wingetUpstream | Should -Be 'https://github.com/microsoft/winget-pkgs.git'
}
}

Context 'Get-Remote Function' {
It 'Should return $null for non-existent remote' {
$result = Get-Remote -RemoteName 'nonexistent-remote-xyz'
$result | Should -BeNullOrEmpty
}

It 'Should accept RemoteName parameter' {
{ Get-Remote -RemoteName 'origin' } | Should -Not -Throw
}
}

Context 'Set-Remote Function' {
It 'Should accept RemoteName and Url parameters' {
{ Set-Remote -RemoteName 'test' -Url 'https://example.com/test.git' } | Should -Not -Throw
}

It 'Should return boolean result' {
$result = Set-Remote -RemoteName 'test' -Url 'https://example.com/test.git'
($result -is [System.Boolean]) | Should -Be $true
}
}

Context 'Find-PullRequest Function' {
It 'Should accept PackageIdentifier and PackageVersion parameters' {
{ Find-PullRequest -PackageIdentifier 'Test.Package' -PackageVersion '1.0.0' } | Should -Not -Throw
}

It 'Should handle web request errors gracefully' {
{ Find-PullRequest -PackageIdentifier 'Invalid...Package' -PackageVersion '1.0.0' } | Should -Not -Throw
}
}

Context 'Get-PrTemplate Function' {
It 'Should not throw when called' {
{ Get-PrTemplate } | Should -Not -Throw
}

It 'Should return string or null' {
$result = Get-PrTemplate
(($result -is [string]) -or ($result -eq $null)) | Should -Be $true
}

It 'Should handle web request failures gracefully' {
{ $result = Get-PrTemplate; $result } | Should -Not -Throw
}
}
}
Loading
Loading