Modules built with the Process-PSModule workflow signal
the intended release size by applying a version-bump label (major, minor, or patch) to a pull
request. While the pull request is open, the pipeline resolves and reports the version the change would
produce, so the author can confirm the next version before merging.
Request
What happens
On a pull request the resolved/previewed version always reflects a patch increment, regardless of
which bump label is applied. For a repository whose latest release is v0.4.1, a pull request labelled
minor previews v0.4.2-<branch> instead of v0.5.0-<branch>. The bump label appears to be ignored
until the pull request is merged into the default branch, so the author cannot see the version the change
will actually create.
What is expected
The previewed version reflects the applied bump label: a minor pull request previews the next minor
version, a major pull request previews the next major version, and so on. Whether the run publishes
anything is a separate concern and should be controlled independently (by the prerelease label and the
merge event), not conflated with which version is shown.
Reproduction steps
- Use a module repository whose latest release is, for example,
v0.4.1.
- Open a pull request and apply the
minor label (and no prerelease label).
- Open the run's Plan → Resolve-Version step.
- Observe the resolved version is
v0.4.2-<branch>NNN (a patch), not v0.5.0-<branch>NNN.
Environment
- Process-PSModule: v6.1.1 (also reproduces on the current default branch)
- Event:
pull_request
Regression
Not a recent regression. The bump label has only ever been evaluated on publishing events, so
non-publishing pull requests have always previewed a patch version.
Workaround
Also apply a prerelease label: that switches the run to a prerelease-publishing event, which causes the
bump label to be evaluated. It has the side effect of actually publishing a prerelease, so it is not a
true preview.
Acceptance criteria
- On a pull request, the previewed version reflects the applied
major/minor/patch label.
- With no bump label, the preview still falls back to a patch version.
- The
prerelease label controls only whether a prerelease is published — not which version is shown.
- Released version numbers on merge to the default branch are unchanged.
Technical decisions
Root cause: The version-bump label evaluation lives in
PSModule/Resolve-PSModuleVersion, invoked by the
Resolve-Version step of
Plan.yml. In
Resolve-ReleaseDecision the major/minor/patch evaluation was nested inside an
if ($shouldPublish) { ... } block. On a pull_request event,
Get-PSModuleSettings sets
Settings.Publish.Module.ReleaseType = 'None' (a release is only cut on merge to the default branch, or a
prerelease when the prerelease label is present), so ShouldPublish is $false, the label block is
skipped, and the decision falls back to a patch bump.
Fix approach: Always evaluate the bump labels in Resolve-ReleaseDecision, independent of
ShouldPublish. ReleaseType (and the prerelease label that drives it) then controls only whether and
how the run publishes — never the version increment. The no-bump-label fallback continues to default to
patch and to not publish an unlabelled change.
Fix location: The change belongs in Resolve-PSModuleVersion (proposed in
PSModule/Resolve-PSModuleVersion#9).
Process-PSModule consumes it by bumping the pinned Resolve-PSModuleVersion reference in Plan.yml once
released.
Backward compatibility: All existing Resolve-PSModuleVersion decision, version and end-to-end test
cases are unchanged; the only behavioural difference is for label combinations that were previously never
evaluated (for example minor on a non-publishing event). Merge-to-default-branch releases are
unaffected.
Verified: With the fix wired in, a minor-labelled pull request against v0.4.1 previews
v0.5.0-<branch>001 with ShouldPublish = False (was v0.4.2-<branch>001 before).
Related: #373 concerns a separate Resolve-Version gap on schedule/workflow_dispatch events. This
issue is specifically about bump labels being ignored on pull_request events.
Implementation plan
Resolve-PSModuleVersion
Process-PSModule
Modules built with the Process-PSModule workflow signal
the intended release size by applying a version-bump label (
major,minor, orpatch) to a pullrequest. While the pull request is open, the pipeline resolves and reports the version the change would
produce, so the author can confirm the next version before merging.
Request
What happens
On a pull request the resolved/previewed version always reflects a patch increment, regardless of
which bump label is applied. For a repository whose latest release is
v0.4.1, a pull request labelledminorpreviewsv0.4.2-<branch>instead ofv0.5.0-<branch>. The bump label appears to be ignoreduntil the pull request is merged into the default branch, so the author cannot see the version the change
will actually create.
What is expected
The previewed version reflects the applied bump label: a
minorpull request previews the next minorversion, a
majorpull request previews the next major version, and so on. Whether the run publishesanything is a separate concern and should be controlled independently (by the
prereleaselabel and themerge event), not conflated with which version is shown.
Reproduction steps
v0.4.1.minorlabel (and noprereleaselabel).v0.4.2-<branch>NNN(a patch), notv0.5.0-<branch>NNN.Environment
pull_requestRegression
Not a recent regression. The bump label has only ever been evaluated on publishing events, so
non-publishing pull requests have always previewed a patch version.
Workaround
Also apply a
prereleaselabel: that switches the run to a prerelease-publishing event, which causes thebump label to be evaluated. It has the side effect of actually publishing a prerelease, so it is not a
true preview.
Acceptance criteria
major/minor/patchlabel.prereleaselabel controls only whether a prerelease is published — not which version is shown.Technical decisions
Root cause: The version-bump label evaluation lives in
PSModule/Resolve-PSModuleVersion, invoked by theResolve-Versionstep ofPlan.yml. InResolve-ReleaseDecisionthemajor/minor/patchevaluation was nested inside anif ($shouldPublish) { ... }block. On apull_requestevent,Get-PSModuleSettingssetsSettings.Publish.Module.ReleaseType = 'None'(a release is only cut on merge to the default branch, or aprerelease when the
prereleaselabel is present), soShouldPublishis$false, the label block isskipped, and the decision falls back to a patch bump.
Fix approach: Always evaluate the bump labels in
Resolve-ReleaseDecision, independent ofShouldPublish.ReleaseType(and theprereleaselabel that drives it) then controls only whether andhow the run publishes — never the version increment. The no-bump-label fallback continues to default to
patch and to not publish an unlabelled change.
Fix location: The change belongs in
Resolve-PSModuleVersion(proposed inPSModule/Resolve-PSModuleVersion#9).
Process-PSModule consumes it by bumping the pinned
Resolve-PSModuleVersionreference inPlan.ymloncereleased.
Backward compatibility: All existing
Resolve-PSModuleVersiondecision, version and end-to-end testcases are unchanged; the only behavioural difference is for label combinations that were previously never
evaluated (for example
minoron a non-publishing event). Merge-to-default-branch releases areunaffected.
Verified: With the fix wired in, a
minor-labelled pull request againstv0.4.1previewsv0.5.0-<branch>001withShouldPublish = False(wasv0.4.2-<branch>001before).Related: #373 concerns a separate
Resolve-Versiongap onschedule/workflow_dispatchevents. Thisissue is specifically about bump labels being ignored on
pull_requestevents.Implementation plan
Resolve-PSModuleVersion
major/minor/patchlabel evaluation out of theif ($shouldPublish)gate inResolve-ReleaseDecisionso it always runs (#9)None + minorandNone + majorpreviewsResolve-PSModuleVersionversionProcess-PSModule
Resolve-PSModuleVersionreference in.github/workflows/Plan.ymlto the released version