Repository navigation
Release-GHRepository requires a release label or a configured bump - #109
Marius Storhaug (MariusStorhaug) wants to merge 48 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a strict, “fail-closed” release-decision model based on a canonical, action-owned release: label set, removing legacy/bare label influence and eliminating default/automatic patching behavior.
Changes:
- Adds a PowerShell helper module to define canonical release labels and to resolve/validate release decisions from PR labels.
- Updates the main action logic to (a) provision canonical labels each run and (b) drive release/prerelease/skip decisions exclusively via the resolver.
- Updates documentation, action inputs, and workflows to reflect the new owned-label contract and required events/permissions; adds unit tests for the resolver.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
tests/Release-GHRepository.Helpers.Tests.ps1 |
Adds Pester coverage for canonical label definitions and release-decision resolution/rejection rules. |
src/Release-GHRepository.Helpers.psm1 |
Introduces canonical label definitions and the strict Resolve-ReleaseDecision validator. |
src/main.ps1 |
Provisions canonical labels and replaces legacy label/auto-patching logic with the resolver output. |
README.md |
Documents the owned-label contract, workflow requirements, and v2→v3 migration steps. |
action.yml |
Removes legacy label/auto-patching inputs and clarifies Prerelease input semantics. |
.github/workflows/Release.yml |
Ensures label transitions are evaluated (unlabeled) and grants issues: write for label provisioning. |
.github/workflows/Action-Test.yml |
Adds Pester unit tests and expands PR event types to include unlabeled. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
src/main.ps1:154
$createPrereleasecan become true for merged/closed pull requests when the PR targets a non-default branch (because$closedPullRequestonly covers closed-but-not-merged). That would create prereleases from closed PRs, conflicting with the intended “open pull request prerelease” behavior.
$createPrerelease = $releaseDecision.Prerelease -and -not $createRelease -and -not $closedPullRequest
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
.github/workflows/Release.yml:19
pull_request_targetsetsgithub.refto the base/default branch (e.g.refs/heads/main), so using${{ github.workflow }}-${{ github.ref }}collapses all PR runs into the same concurrency group. Withcancel-in-progress: true, activity on one PR can cancel an in-progress run for a different PR, which can interrupt release/prerelease creation or cleanup. Use a PR-scoped key (e.g. PR number) to isolate runs per PR (matching the README guidance).
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Release guidance now defines one owned `release:` label set: `release:patch`, `release:minor`, `release:major`, `release:pre-release`, and `release:skip`. Release automation ignores bare and unrelated labels, so only explicit release decisions affect published versions. ## Changed: One release label contract Release Management, Automation Labels, PR Format, Natural Language examples, and the VS Code Extension Framework now use the same namespaced values. Prereleases use `release:pre-release` with one bump label, while non-releasing changes use `release:skip` alone. ## Changed: Ad hoc releases are optional A labeled pull request merge is the required release path. Implementations may add `workflow_dispatch` only when they need an explicit ad hoc mechanism; it must use the same release controls and require its decision and release-note context as inputs. Empty pull requests and direct pushes are not release workarounds. --- <details> <summary>Technical details</summary> - Replaced `release:none` and the unnamespaced `Prerelease` label. - Defined valid and invalid combinations for the five owned release labels. - Made `workflow_dispatch` an optional implementation extension rather than a mandatory release interface. - Preserved the mainline removal of dependency-tool label guidance while resolving the branch update. | Changed surface | Standards checked | Framework docs checked | Result | | --- | --- | --- | --- | | `src/docs/Capabilities/release-management/**` | Natural Language, Markdown | Release Management | Aligned | | Release-label references under `src/docs/**` | Natural Language, Markdown | Automation Labels, PR Format, VS Code Extension Framework | Aligned | </details> <details> <summary>Relevant issues (or links)</summary> ### Related work - References PSModule/Release-GHRepository#109 - References PSModule/Process-PSModule#524 </details> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
MSX pull request authors now put the exact upgrade steps in a `Migration guide` block for each result that needs one. Keep the impact, reason, affected uses, and required action visible so consumers can see what applies to them. If you skip versions, read the release notes after your actual baseline through the version you select. Keep any intermediate operation that the notes require. This change updates the guidance; it does not change release automation or require product configuration edits. <!-- ANNOUNCEMENT STOP --> ## Changed: Pull request authors keep adoption steps with each result The pull request supplies the release note. The release record must preserve the complete reviewed title and description for the exact source, including collapsed blocks. Authors can keep the visible text short without sending consumers to a diff, template, or separate guide for required steps. Use the new section order and block names when you write or update an MSX pull request. Keep the existing summary marker. If a result needs no adoption steps, explain why no action is necessary and omit the migration block. <details> <summary>Migration guide</summary> 1. Put the most important consumer result in the title and summary. For each result, state what changes, why it matters, and which uses remain compatible. Give the required action or the reason why no action is necessary. Keep deadlines and prerequisites that control the upgrade visible. Put the summary marker on its own line after the summary. 2. Use `## <qualifier>: <result>` for each result. Put consumer sections in this order: `Breaking`, `Removed`, `New`, `Changed`, and `Fixed`. Put `## Internal: <result>` sections after consumer sections. If the change is only internal, use the internal result in the title and summary. 3. If a result has adoption steps, use a `<details>` block with `<summary>Migration guide</summary>`. If a draft uses `Migration details`, replace that block name with `Migration guide`. Give the applicable baselines and exact edits in order. Include any required intermediate operation and the expected result of each check. 4. Put applicable `Technical details` and `Related links` blocks after the migration block. Replace `Related references` with `Related links`. If evidence supports more than one result, record it once and name those results. 5. If the target route invokes Release Management, put `Release details` last. Replace the old `Release decisions` block name. Check the decision against the full release range, effective configuration, and owned labels. If the route does not invoke Release Management, omit the block and all `release:*` labels. </details> <details> <summary>Technical details</summary> The delivery plan is complete in this branch. The review compared the old and new examples, checked first-publication and deferred-release cases, and read through a skipped-version upgrade. In that case, the target superseded a configuration rename but still required the earlier data conversion. The notes provided both decisions without a separate guide. Local checks passed: 66 Pester tests, Markdown lint on 18 changed files, local links in 130 files, four GitHub links in changed files, and a strict site build with Zensical 0.0.50. The build confirmed that the previous PR Format section links still resolve. These results support both consumer sections. The MSX plugin metadata uses version `0.3.1`. The PR authoring and consumer upgrade skills still link to the canonical guidance. The target branch deploys the documentation site to GitHub Pages. It does not invoke Release Management. This pull request changes no workflow and publishes no versioned artifact. | Changed surface | Standards checked | Framework docs checked | Result | | --- | --- | --- | --- | | PR format, readiness, and workflow guidance | PR Format, Documentation Model, Natural Language, Markdown | Release Management: release notes and evidence | Aligned | | Consumer upgrades and release guidance | Consumer Upgrades, Documentation Model, Continuous Delivery and Release | Release Management: artifact scope, source, and template evidence | Aligned | | Repository governance and dependency update guidance | Repository Standard, PR Format | Repository Governance and Dependency Updates | Aligned | | Contributor instructions, skills, and plugin manifests | Contribution Workflow, PR Format | Agentic Development: plugin distribution | Aligned | The issue search covered open titles about upgrades, release notes, and PR format in MSXOrg/docs. This change does not resolve another issue in that set. </details> <details> <summary>Related links</summary> - Resolves #299 - References PSModule/Release-GHRepository#109 </details> ## Changed: Consumers use the full release range to plan skipped-version upgrades Start with the version or source that you actually use, not the current destination of a moving tag. Read each applicable note after that baseline through the fixed target. This gives you required steps that the newest note alone might not contain. If a later note replaces an earlier edit, follow the replacement. Keep any intermediate installation or run that the notes still require. If a required step is missing, stop the affected upgrade and report the gap to the producer.
There was a problem hiding this comment.
🔵 Needs a closer look
Human assessment is needed because the release workflow and documented caller both disable checkout credentials while the action still performs authenticated Git fetch and push operations, creating a complex publication-path failure risk.
No open issues 🎉
3 resolved since last review
Review effort: Lite
There was a problem hiding this comment.
🟡 Changes recommended
The stable publication path cannot complete or safely recover because checkout credentials are disabled for required Git tag pushes, and a failed alias update can leave the release permanently inconsistent.
4 open issues
Review effort: Lite
The Release Management design now explains how maintainers can prerelease a reviewed fork contribution. The fork pull request stays read-only and cannot authorize publication. This documentation change requires no changes to existing release workflows or permissions. <!-- ANNOUNCEMENT STOP --> ## New: Prerelease steps for fork contributions An authorized maintainer reviews and approves the exact fork change before merging it into a separate branch in the base repository. Trusted publisher code uses the reviewed revision on that branch. If the route supports prereleases from pull requests, the maintainer applies `release:prerelease` to a same-repository pull request from the branch. The branch alone does not enable publication on push. <details> <summary>Technical details</summary> | Changed surface | Standards checked | Framework docs checked | Result | | --- | --- | --- | --- | | `src/docs/Capabilities/release-management/design.md` | Documentation Model, Markdown, GitHub Actions trust rule | Release Management spec and design | Aligned | - The new **Prerelease a fork contribution** section links to the rule against running untrusted code with a writable token. - Local and cross-repository link checks passed. All 66 Pester tests passed. The Zensical build produced the new section anchor. - The docs workflow deploys to GitHub Pages. It does not publish a versioned artifact. - No delivery issue is linked. The search for fork-related MSXOrg/docs issues found none that this change resolves. </details> <details> <summary>Related links</summary> - References PSModule/Release-GHRepository#109. </details>
There was a problem hiding this comment.
🔵 Needs a closer look
Human validation is still required for the write-enabled GitHub release workflow, immutable consumer compatibility, authenticated publication behavior, and recovery from concurrent or partial failures.
No open issues 🎉
4 resolved since last review
Review effort: Lite
There was a problem hiding this comment.
🔵 Needs a closer look
Human assessment is needed because the changes introduce unverified workflow complexity, including a potentially unavailable test dependency and a concurrency-key mismatch that could allow validation and publication runs to overlap.
No open issues 🎉
Review effort: Lite
There was a problem hiding this comment.
🟡 Changes recommended
Critical active findings show that both the release workflow and its README example lack the required issues: write permission for label creation, causing publishing to fail before release creation.
2 open issues
Review effort: Lite
If your workflow relies on automatic patch bumps, set `DefaultBump: patch`. Without a configured bump, a pull request needs one release bump label or `release:skip`. <!-- ANNOUNCEMENT STOP --> ## Breaking: A missing release decision fails the run The shared `DefaultBump` is `none`. A bump label still overrides a configured bump. `release:prerelease` selects the mode; it does not supply a bump. A valid `release:skip` decision does not need a bump. <details> <summary>Migration guide</summary> 1. If your workflow uses the implicit `patch` behavior from the namespaced label candidate, add `DefaultBump: patch` to the release settings file or action inputs in the upgrade PR. Otherwise, apply one bump label or `release:skip` to each pull request. You do not need to set `none`. 2. If a workflow must require an explicit decision even when the file sets a bump, use `DefaultBump: none` in that invocation. 3. Run the action with `WhatIf: true`. Check that one bump label, a configured bump, and a valid skip each work. Check that `release:prerelease` alone fails when no default is configured. Do not use this draft branch as a production action pin. </details> <details> <summary>Technical details</summary> The scoped base is the fixed resolver revision `fa4b27e2c4a12aeffb66ac01e43d443e7ca6edda` from #109. The revised tests failed before the change. All 237 Pester cases passed with the change. The tests simulate publishing operations. No production rollout or template compatibility is claimed. The linked Release Management design still lists `patch`; align it before publication. </details> <details> <summary>Related links</summary> - Depends on #109 - References #112 </details>
There was a problem hiding this comment.
🟡 Changes recommended
Active issues remain, including a critical path that prevents stable releases from being published on merged pull requests, along with mutable runners, an incorrect default bump, and non-resumable label provisioning.
6 open issues
Allow merged PR closes to publish stable releases · New Pin the release-decision job to a specific runner image · New Pin the publisher job to ubuntu-24.04 · New Restore patch as the shared default release bump · New Provision labels before publication or make setup resumable · New Pin the unit-test job to an approved runner image · New
2 resolved since last review
Review effort: Lite
| $publishing = $Settings.Mode -ceq 'publish' | ||
| $closedPullRequest = $GitHubEvent.action -ceq 'closed' -or $GitHubEvent.pull_request.state -ceq 'closed' | ||
| $cleanupOnly = $publishing -and $eventName -ceq 'pull_request' -and $closedPullRequest | ||
| if ($cleanupOnly -and $ReleaseVersion) { | ||
| throw 'ReleaseVersion was supplied, but a closed pull request is not eligible for publication.' |
There was a problem hiding this comment.
🔵 Needs a closer look
Human assessment is needed because the omitted review evidence indicates critical defects in both zero-baseline version calculation and atomic maintenance of stable release aliases.
1 open issue
5 resolved since last review
Review effort: Lite



Replace legacy release labels with namespaced
release:labels. Pin the published action by full commit SHA in the same upgrade pull request. If your workflow relies on automatic patch bumps, setDefaultBump: patch.If your workflow publishes stable releases on pull request close, move stable publication to pushes to the default branch before you switch. Keep
pull_requestfor prereleases and cleanup. You can also calculate a version without publishing.Breaking: Release decisions need a bump or skip
The action reads only the five release labels in the table below. One bump label overrides
DefaultBump. With no bump or skip label, the action uses the configured default. Without a configured bump, the effective value isnoneand the decision fails. Multiple bump labels fail the run.release:skipwith another supported release label also fails.Migration guide
DefaultBump: patchin the workflow or settings file if you want to keep automatic patch bumps. For a different default, useminorormajor. Otherwise, use one bump label orrelease:skipfor each pull request. To clear a file default for one caller, set the input tonone.PSModule/Release-GHRepository@<published-release-sha>inuses:. ReplacePSModule/Auto-Releaseif your workflow uses that name. Do not use this pull request's head as a production pin. If you use a template, first verify an immutable template revision with the selected action revision.Mode: calculateon a test pull request. Check that the bump label overrides the default, a valid skip returns no version, and conflicting labels fail. WithDefaultBump: none, check that an unlabeled pull request fails.patchorfixrelease:patchminororfeaturerelease:minormajororbreakingrelease:majorprereleaserelease:prereleaseon an open pull request, with one bump label or a configured defaultNoReleaseor a custom ignore labelrelease:skipwithout another supported release labelTechnical details
Release coverage for all consumer sections. The product is the Git-distributed action. The publishing target is the GitHub stable release and tag channel. The last confirmed stable publication is v2.0.3, receipt
351975133, published2026-07-10T08:29:31Z. Its notes name #106. The current tag and downloaded source archive identify that pull request's squash commit,PSModule/Release-GHRepository@750abed0ecab02394554b610dc3aa191e75e3248. The release is not immutable. The original publisher log is unavailable.Candidate and comparisons. The candidate is
PSModule/Release-GHRepository@15b4e64e8735f66bdf349cb23ed1ab9f2b3952b9. The stable source comparison includes the unpublishedpull_requestexample from #114. The separate PR-base comparison starts at0fbca9f0c422d1d8f79e97b3b9fe1d50e106feab.Template compatibility. The Template-Action publisher at
PSModule/Template-Action@634ca503a47a39ca26d72fa59c784da8118ae835still pinsPSModule/Auto-Releasev2.0.2. No compatible template revision has been verified against this candidate.Breaking: Stable releases use pushes to the default branch
A pull request close no longer publishes a stable release. The stable publisher uses the exact pushed commit. If a pull request merged at that commit, the action uses its current release labels. A direct push without a matching pull request needs a configured bump.
Migration guide
pushwith abranchesfilter for your default branch, such asmain. Check out${{ github.sha }}. Run the new action in Publish mode. Give the stable jobcontents: writefor release and tag changes andpull-requests: readto read the matching pull request. Do not start the stable publisher on tag pushes.pull_requestpublishing job for prereleases and cleanup. Includeopened,reopened,synchronize,labeled, andunlabeledfor decisions on open pull requests. Includeclosedfor cleanup. Use trusted publisher code from the base repository. Run the write-enabled job only for same-repository pull requests. Usecontents: writeandpull-requests: writefor that job. The latter covers labels and comments;issues: writeis not necessary.release:prereleasewith a bump label or configured default. Review the revision again if it changes.WhatIf: trueto check the tag and exact target. If you copy the pull request record to the notes, keepUsePRTitleAsNotesHeadingandUsePRBodyAsReleaseNotesset totrue. Check that the planned notes contain the full title and description. Check that pull request close only plans cleanup.Related links
Breaking: Named inputs override repository settings
The action resolves the defaults, the selected settings file, and then nonempty named inputs. An explicit
falseor a value equal to a default overrides the file. An omitted, null, or empty named input retains the file value. Invalid values fail even if another layer overrides them.Migration guide
with:setsConfigurationFileto a custom path, rename it toSettingsFilePath. Keep the same path. If it selects.github\auto-release.yml, omit the input. That file remains the default.AutoPatching,IgnoreLabels,MajorLabels,MinorLabels, andPatchLabelsfrom the workflow and settings file. If releases were opt-in, userelease:skipon pull requests that must not publish. Follow the new label rules for the other pull requests.WhatIf: falseif the file setsWhatIf: true. Correct unknown keys, null file values, and invalid settings. To remove a version prefix or date suffix, setVersionPrefix: ''orDatePrereleaseFormat: ''in the file.SettingsFilePath, use a path from the explicitWorkingDirectoryinput or, if omitted, fromgithub.workspace. A file-definedWorkingDirectorychanges where the action runs. It does not select a different file. Relative execution directories start atgithub.workspace.Debug,Verbose,WorkingDirectory,Version, andPrereleasein the file. Keep named inputs only for caller overrides.VersionandPrereleaseselect the GitHub PowerShell module. Userelease:prereleaseto select repository prerelease mode.DefaultBump: majorgives a major decision unless an input or label overrides it.Technical details
The settings, startup, and cleanup implementation steps for #111 are complete in this candidate. Delivery still depends on #112. The scope check covered open issues for push publication, workflow standards, settings, and cleanup. No additional issue is closed here.
Related links
New: Calculate a version without publishing
Mode: calculatereturns a release decision without changes to GitHub. It can calculate a prerelease for an open pull request withoutrelease:prerelease. It can also calculate for a branch push that matches an open pull request. Only a push to the default branch calculates a stable version. A valid skip returns no version.Publish remains the default mode. Use its optional
ReleaseVersioninput to reuse a version from Calculate. If you omit the input, Publish calculates the version for an eligible event. A stale or invalid version fails before the action changes the repository.Migration guide
id: calculateandMode: calculateif you need a read-only decision. Give it read access to contents and pull requests in the target repository. UsePullRequest: OWNER/REPO#NUMBERfor a fork push or when more than one open pull request matches a branch push.steps.calculate.outputs.Decisionandsteps.calculate.outputs.BumpSource. Expectreleaseand an unprefixedReleaseVersionfor a valid bump. Expectskipand an empty version for a valid skip. Invalid settings or stale source inputs fail the run.Decisionisrelease. SetReleaseVersionto${{ steps.calculate.outputs.ReleaseVersion }}. If Calculate returnsCalculatedAtfor a date-dependent prerelease, pass it unchanged. If you use a separate job in the same run, pass the values through job outputs. Do not pass the release version to the dependency inputVersion.WhatIf: trueon the Publish step to preview the handoff. Check the planned target and tag. An open pull request still needsrelease:prereleasefor Publish to create a prerelease.Fixed: Prerelease tags use the exact pull request head
The action creates a new prerelease tag at the exact head commit. It checks an existing tag before publication. An exact
ReleaseVersioncannot move an existing prerelease tag to another commit. In Publish mode on a pull request, label setup finishes before release or tag changes. If label setup fails, the action does not change releases or tags.Fixed: Cleanup keeps prereleases from other series
With
AutoCleanupenabled, a pull request close removes only prereleases under the effectiveVersionPrefixwith the exact branch identifier. This works with empty prefixes and prefixes that contain hyphens.release:skipdoes not stop cleanup.Migration guide
No change is necessary if you keep
VersionPrefix. If you change it, close the active prerelease series with the old prefix first or arrange separate cleanup. The action does not remove prereleases under earlier prefixes.Internal: Report the current release decision before merge
The
Release decisionjob checks pull requests tomain, including forks and changes that affect only documentation. It uses read-only permissions, the candidate publisher settings, live labels, and the checked merge revision. It is separate fromAction-Test. It is advisory: a label-only rerun does not invalidate an earlier pass at the same commit.Review only. Do not merge this pull request yet. The repository publisher still listens only for
pull_request. Verify the stable push publisher and its exact tag and notes under #108. Complete required-check enforcement and independent verification under #112. Independent approval is still necessary.Technical details
The candidate includes #118, #119, #120, and #121. The Pester job passed 338 cases at the candidate. The read-only decision job and lint job also passed. The tests simulate publishing writes. The hosted checks do not verify stable publication or live enforcement.
none. The design still listspatchas the shared default. Align the design before publication.Related links
Release details
release:majorselects the bump. Legacy labels and stable publication on pull request close are incompatible.mainafter the publisher transition.release:major