🪲 [Fix]: Resolve the current version on non-PR runs (bump Resolve-PSModuleVersion to v1.1.5)#375
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes a regression where the reusable workflow’s Plan job failed on non–pull-request events (e.g., schedule, workflow_dispatch) by ensuring version resolution only runs when PR context exists.
Changes:
- Gate the
Resolve-Versionstep to run only onpull_requestevents. - Add an in-file comment explaining the PR-context requirement and why skipping is safe for non-PR runs.
- Preserve downstream behavior by allowing
Enrich-Settingsto consume empty outputs and defaultReleaseType/CreateReleaseappropriately.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
|
Superseded by the root-cause fix in PSModule/Resolve-PSModuleVersion#10 — the action now resolves to the current version on non-PR events (workflow_dispatch/schedule) instead of throwing, per the agreed design (no bump label → current version; PR/merge keep patch-default). Once #10 is released, this PR will be reworked into a simple bump of the Resolve-Version pin, dropping the Plan.yml gate and the 999.0.0 fallback. Marking as draft until then. |
7a5a176 to
42ad0d6
Compare
|
Reworked into the pin bump as planned now that PSModule/Resolve-PSModuleVersion#10 is merged and released as v1.1.5. The branch was reset to current |
The
Planjob no longer fails onscheduleandworkflow_dispatchevents.Resolve-PSModuleVersionis bumped tov1.1.5, which resolves the current published version on non–pull-request events instead of throwing.Fixed: non–pull-request runs (schedule / workflow_dispatch)
Since v6.1.0 the
Planjob runsResolve-Versionon every event, and the action threw"...must be run from a pull_request event"on non-PR events — failing the whole run (every jobneeds: Plan).Resolve-PSModuleVersionv1.1.5(PSModule/Resolve-PSModuleVersion#10) fixes this at the source: on a non-PR event it returns the current published version — no bump, no prerelease, nothing published — floored at0.0.0for a module that has never been released. Pull-request and merge-to-default-branch behavior is unchanged: labels drive the bump (patch default), and the version preview on regular PRs is retained.Technical Details
.github/workflows/Plan.yml: bump theResolve-Versionpin8d1dac7(v1.1.4) →6a59a88(v1.1.5). One-line change — noPlangate orTest-ModuleLocalfallback is needed, because v1.1.5 always populatesSettings.Module.Versionon non-PR events.Plan.ymlgate +999.0.0fallback approach, replaced by the root-cause fix in the shared action.workflow_dispatchself-test run on this branch completes (previously failed atPlan); the PR self-test resolves a version as before.