Skip to content

Move GitHub and File Operation functionality to Modules - #380522

Merged
Demitrius Nelon (denelon) merged 11 commits into
microsoft:masterfrom
Trenly:NetRefactor
Jul 14, 2026
Merged

Demitrius Nelon (denelon) merged 11 commits into
microsoft:masterfrom
Trenly:NetRefactor

Conversation

@Trenly

@Trenly Kaleb Luedtke (Trenly) commented May 27, 2026 •

Copy link
Copy Markdown
Contributor

📖 Description

This PR refactors YamlCreate support logic into dedicated, reusable PowerShell modules.

What changed

  • Added Tools/Modules/YamlCreate/YamlCreate.GitHub/:
    • YamlCreate.GitHub.psd1
    • YamlCreate.GitHub.psm1
    • YamlCreate.GitHub.Tests.ps1
  • Added Tools/Modules/FileOperations/:
    • FileOperations.psd1
    • FileOperations.psm1
    • FileOperations.Tests.ps1
  • Updated Tools/YamlCreate.ps1 and Tools/Modules/YamlCreate/YamlCreate.psd1 to use these shared modules instead of inlined implementation details.

Why this change was made

  • Maintainability: Separating GitHub and file system concerns into focused modules reduces coupling inside YamlCreate.ps1, making future updates safer and easier to reason about.
  • Readability: Smaller, responsibility-driven modules are easier to navigate than a single script containing mixed concerns.
  • Reusability: Common operations now live in importable modules, so other tooling can consume the same functionality without duplicating logic.
  • Testability and reliability: Module-scoped tests were added with the modules, enabling targeted validation of behavior where the logic now lives.

Forward-looking impact

A potential follow-up PR can reuse these same modules from Tools/SandboxTest.ps1, helping consolidate shared behavior across tooling and avoid parallel implementations.

✅ Checklist

📦 Manifest Checklist

  • Checked that there aren't other open pull requests for the same manifest update/change (N/A: non-manifest tooling PR)
  • This PR only modifies one (1) manifest (N/A: non-manifest tooling PR)
  • Validated manifest locally with winget validate --manifest (validation guide) (N/A: non-manifest tooling PR)
  • Tested manifest locally with winget install --manifest (N/A: non-manifest tooling PR)
  • Manifest conforms to the 1.12 schema (N/A: non-manifest tooling PR)

Note

is the directory containing the manifest you're submitting. This PR does not submit or modify manifests.

@wingetbot wingetbot (wingetbot) added the Project-File The pull request modifies repository project or configuration files. label May 27, 2026
@microsoft-github-policy-service microsoft-github-policy-service Bot added the Needs-Attention This work item needs to be reviewed by a member of the core team. label May 27, 2026
@microsoft-github-policy-service microsoft-github-policy-service Bot removed the Needs-Attention This work item needs to be reviewed by a member of the core team. label May 27, 2026
@Trenly
Kaleb Luedtke (Trenly) marked this pull request as ready for review June 15, 2026 19:48
@Trenly

Copy link
Copy Markdown
Contributor Author

Comment thread Tools/YamlCreate.ps1 Outdated
@microsoft-github-policy-service microsoft-github-policy-service Bot added the Moderator-Approved One of the Moderators has reviewed and approved this PR label Jun 30, 2026
@denelon

Copy link
Copy Markdown
Collaborator
image

@denelon

Copy link
Copy Markdown
Collaborator

I'm not sure what's going on with this one...

@Trenly

Copy link
Copy Markdown
Contributor Author

I'm not sure what's going on with this one...

I can try a rebase to get it up to date

@microsoft-github-policy-service microsoft-github-policy-service Bot removed the Moderator-Approved One of the Moderators has reviewed and approved this PR label Jul 8, 2026
@denelon
Demitrius Nelon (denelon) merged commit 936ffd2 into microsoft:master Jul 14, 2026
3 checks passed
@Trenly
Kaleb Luedtke (Trenly) deleted the NetRefactor branch July 14, 2026 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Project-File The pull request modifies repository project or configuration files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants