Skip to content

Require an explicit release decision by default - #118

Merged
Marius Storhaug (MariusStorhaug) merged 3 commits into
namespaced-release-labelsfrom
release-decision-gate
Nov 27, 2026
Merged

Marius Storhaug (MariusStorhaug) merged 3 commits into
namespaced-release-labelsfrom
release-decision-gate

Conversation

@MariusStorhaug

Copy link
Copy Markdown
Member

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.

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.

Migration guide
  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.
Technical details

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.

Related links

Marius Storhaug (MariusStorhaug) added a commit that referenced this pull request Nov 27, 2026
Relates to #112
Depends on #120

## Summary

The separate `Release decision` job checks `main` PRs, including forks
and docs-only changes. It uses the candidate publisher inputs and the
exact labels Calculate read. A valid skip passes without a version.

This check is advisory, not required. It does not change
`.github/workflows/Release.yml`, rules, permissions outside the new job,
auto-merge, labels, releases, or tags.

## Evidence

- Failing-first parser, settings, and snapshot tests.
- 336/336 local Pester 6.1.0 tests on the integrated branch. They
include the actual bootstrap and report scripts with a shallow docs-only
fork fixture, label-only staleness at an unchanged SHA, and read-only
GitHub mocks.
- Repository PowerShell analyzer, action and workflow YAML lint, and
diff checks passed.
- Hosted [Action-Test and
Pester](https://github.com/PSModule/Release-GHRepository/actions/runs/46059063429)
and
[Super-Linter](https://github.com/PSModule/Release-GHRepository/actions/runs/46059063442)
passed at `4162e4444aa6f6dbd0328984a18097f2e8837887`.
- A live read-only GitHub merge-ref snapshot test used #118. It was not
a hosted run of the new job.

The new workflow only runs for PRs to `main`. This draft targets the
Publish branch, so the hosted checks above do not include a live
`Release decision` run.
Set `Mode: calculate` to validate a release decision and get a version
without changing the repository. Existing callers stay in `publish` mode
unless they opt in.

<!-- ANNOUNCEMENT STOP -->

## New: Read-only release version calculation

The action calculates a prerelease for an open pull request or a branch
push that matches one. It calculates a stable version only on a push to
the target repository's default branch.

<details>
<summary>Migration guide</summary>

1. In a read-only job, set `Mode: calculate` on the action step. Use a
token that can read pull requests and releases in the target repository.
2. For a fork push or an ambiguous match, set `PullRequest` to
`OWNER/REPO#NUMBER`. The action checks the source repository, branch,
and commit before it uses the pull request.
3. Read `Decision` and `ReleaseVersion` from the step outputs. A valid
`skip` has no version. For a date-dependent prerelease, `CalculatedAt`
gives the UTC instant used in the calculation. Do not pass
`ReleaseVersion` to `Version`; that input still selects the GitHub
module.

</details>

<details>
<summary>Technical details</summary>

This review covers only the Calculate mode and its outputs. The existing
publisher uses the shared SemVer planner and keeps its pull request
trigger and publication rules. The version input and the dedicated pull
request check are separate work.

The new behavior tests failed before implementation. All 274 local
Pester 6.1.0 tests passed, including 37 Calculate tests and 237 existing
tests. The Calculate tests execute the action script with simulated
GitHub reads and the real result writer. PowerShell lint passed for the
source and changed tests. YAML lint passed for the action. No live
publication was tested.

The scoped base is `d7a7565228c29a799b645342ea5dec3cec872fc6` on
`release-decision-gate`. This draft is for review only.

</details>

<details>
<summary>Related links</summary>

- References #112
- Depends on #118

</details>
@MariusStorhaug
Marius Storhaug (MariusStorhaug) marked this pull request as ready for review November 27, 2026 22:14
@MariusStorhaug
Marius Storhaug (MariusStorhaug) merged commit 6cf328b into namespaced-release-labels Nov 27, 2026
16 checks passed
@MariusStorhaug
Marius Storhaug (MariusStorhaug) deleted the release-decision-gate branch November 27, 2026 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant