Skip to content

Commit 65b7cb0

Browse files
Refactor version resolution logic into helper functions (#2)
## Summary Refactor the action script by moving the version resolution workflow out of `scripts/main.ps1` and into a dedicated `scripts/Helpers.psm1` module. This keeps `main.ps1` as a thin orchestrator and makes the individual steps easier to read, compare, and validate. ## Changes - extract action input parsing into `Read-ActionInput` - extract publish settings parsing into `Get-PublishConfiguration` - extract pull request event loading into `Get-GitHubPullRequest` - extract release decision logic into `Resolve-ReleaseDecision` - extract GitHub and PowerShell Gallery version lookups into dedicated helpers - extract next-version calculation and action output writing into dedicated helpers - update `scripts/main.ps1` to orchestrate the helper calls ## Notes - Intended behavior is unchanged for the normal release/version resolution path. - Error handling now throws from helper functions instead of using inline `Write-Error`/`exit` in `main.ps1`. ## Validation - verified the refactor against `main` with `git diff --function-context` - verified both edited PowerShell files report no editor errors locally
1 parent 3237617 commit 65b7cb0

3 files changed

Lines changed: 961 additions & 384 deletions

File tree

0 commit comments

Comments
 (0)