Release-notes CLI: validate-labels, require-changelog-file, amend upload, on-release gaps - #3978
Merged
Merged
Conversation
…d upload, on-release onboarding
Seven concrete gaps blocked onboarding two playground repos to the release-notes pipeline.
This closes them all in the CLI layer before the corresponding docs-actions shared workflows are built.
#### `changelog validate-labels` (new command)
Label-only gate for `pull_request` events. Resolves type and products from the PR's labels against
`pivot.types`, `pivot.products`, and `rules.create` — no GitHub API, no title resolution, no
bot-loop detection. Emits `status` (`ok` | `no-label` | `skipped`), `type`, `products`,
`label-table`, and `skip-labels`. Safe to run from fork-triggered workflows because it needs only
`contents: read`.
#### `--require-changelog-file` on `evaluate-pr`
Hard gate that fails the PR with `missing-entry` when no changelog entry file exists for the PR
number and the flag is set. The flag is a CI decision — it belongs on the command line, not in
`changelog.yml`. Detached from bot commit or comment behaviour, which `release-notes-changelog-file.yml`
continues to own independently.
#### `--artifact-type amend` and comma-list support on `upload`
New artifact type discovers `*.amend-{N}.yaml` sidecars in `bundle.output_directory`, excluding
`.amend-notes`. The upload command now accepts a comma-separated list so `changelog,amend` can be
passed in one call — the fixed convention in the forthcoming shared `release-notes.yml` workflow.
Syncing parent bundles from `main` was wrong for on-release repos; amends are what must travel.
#### `bundle --plan` `mode` output and gh-release intercept
The plan step now emits `mode: gh-release` when `bundle.profiles` is absent, resolving `output_path`
from `bundle.output_directory` so the `bundle-create` action can drop its `find`-based discovery.
`changelog gh-release` now prefers `bundle.output_directory` over `bundle.directory` for its output
path, making writer and plan agree on one path.
#### `validate-onboarding` extended to on-release repos
The onboarding validator now checks products registered with `features.release-notes: on-release`,
not only `prestage`. On-release repos require `release-notes.yml` and `changelog.yml`; prestage repos
keep the existing four-workflow check with a new-shape fallback.
#### `config/products.yml`
Registers `docs-playground-release-notes-changelogs` (`prestage`) and
`docs-playground-release-notes-tagged` (`on-release`). Both carry `public-reference: false` because
neither has a versioning system — they are test repositories, not versioned product docs.
Co-Authored-By: Claude <noreply@anthropic.com>
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/3978/ Sample changed pages: |
theletterf
approved these changes
Aug 31, 2026
Merged
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Seven concrete gaps blocked onboarding two playground repos to the release-notes pipeline. This closes all of them in the CLI layer and registers both repos in
config/products.yml, so the forthcomingdocs-actionsshared workflows can be built on a solid foundation.Affects: Release notes, CLI, Configuration
Why
The minimal (
gh-release-driven) onboarding path was broken in at least three ways:changelog gh-releasewrote its bundle tobundle.directorywhilebundle-create/action.ymlsearched${OUTPUT:-docs/releases}/bundles, so the bundle was never found. No label-only validation workflow existed — even minimal repos had to adopt the full four-workflow validate/submit pair. Anduploadhardcoded--artifact-type changelog, so manual-override amend sidecars could never be pushed frommain. The full path added two more gaps: nothing could require a changelog entry file on a PR, andvalidate-onboardingsilently skipped on-release repos.What
changelog validate-labels(new command)A label-only gate safe for fork-triggered
pull_requestevents. It resolves type and products from labels againstpivot.types,pivot.products, andrules.createwith no GitHub API access and no title resolution. Emitsstatus(ok|no-label|skipped),type,products,label-table, andskip-labels. Exits non-zero only onno-label.--require-changelog-fileonevaluate-prHard gate that fails the PR with
missing-entrywhen no changelog entry file exists for the PR number and the flag is set. The flag is a workflow input — it belongs on the command line rather than inchangelog.yml. It is fully detached from bot commit or comment behaviour, whichrelease-notes-changelog-file.ymlcontinues to own independently.--artifact-type amendand comma-list support onuploadA new artifact type discovers
*.amend-{N}.yamlsidecars inbundle.output_directory, excluding.amend-notes. The command now accepts a comma-separated list (changelog,amend) so sync can push entries and amends in one call — the fixed convention for the forthcomingrelease-notes.ymlshared workflow. Syncing parent bundles frommainis wrong for on-release repos; amends are what must travel.bundle --planmodeoutput and output-path fixThe plan step now emits
mode: gh-releasewhenbundle.profilesis absent and resolvesoutput_pathfrombundle.output_directory, lettingbundle-createdrop itsfind-based gh-release discovery entirely.changelog gh-releasenow prefersbundle.output_directoryoverbundle.directoryfor its output path, so writer and plan agree on one path.validate-onboardingextended to on-release reposThe onboarding validator now checks products registered with
features.release-notes: on-releasein addition toprestage. On-release repos requirerelease-notes.ymlandchangelog.yml; prestage repos keep the existing four-workflow check with a new-shape fallback for repos that have already migrated.Out of scope: The
docs-actionsshared workflow (release-notes.yml,release-notes-changelog-file.yml) and the onboarding docs rewrite are separate PRs that depend on theedgeimage built from this branch. Theelastic/docs-infraOIDC role PR andconfig/assembler.ymlallowlist entry (D9, requires both repos to go public first) are also separate.Verify
./build.sh unit-test # All 1076 changelog tests pass; ProductFeaturesTests confirms both playground products load correctly