changelog gh-release
Create changelog files and a bundle from a GitHub release by parsing pull request references in the release notes.
For details and examples, go to Create and bundle changelogs.
docs-builder changelog gh-release <repo> [version] [options...] [-h|--help]
repo- Required: GitHub repository in
owner/repoformat (for example,elastic/elasticsearch) or just the repository name (for example,elasticsearch), which defaults toelasticas the owner. version- Optional: The release tag to fetch (for example,
v9.2.0or9.2.0). Defaults tolatest.
--config <string?>- Optional: Path to the changelog.yml configuration file. Defaults to
docs/changelog.yml. --output <string?>- Optional: Output directory for the generated changelog files. Defaults to
./changelogs. --strip-title-prefix- Optional: Remove square brackets and the text within them from the beginning of pull request titles, and also remove a colon if it follows the closing bracket.
- For example,
"[Inference API] New embedding model support"becomes"New embedding model support". - Multiple bracket prefixes are also supported (for example,
"[Discover][ESQL] Fix filtering"becomes"Fix filtering"). --warn-on-type-mismatch- Optional: Warn when the type inferred from Release Drafter section headers (for example, "Bug Fixes") doesn't match the type derived from the pull request's labels. Defaults to
true.
The command creates two types of output in the directory specified by --output:
- One YAML changelog file per pull request found in the release notes.
- A
changelog-bundle.yamlfile that references all created changelog files.
The product, target version, and lifecycle are inferred automatically from the release tag and the repository name (via products.yml). For example, a tag of v9.2.0 on elastic/elasticsearch creates changelogs with product: elasticsearch, target: 9.2.0, and lifecycle: ga.
docs-builder changelog gh-release elastic/elasticsearch
docs-builder changelog gh-release elastic/elasticsearch v9.2.0
docs-builder changelog gh-release elasticsearch v9.2.0
docs-builder changelog gh-release elasticsearch v9.2.0 \
--output ./docs/changelog \
--config ./docs/changelog.yml
docs-builder changelog gh-release elasticsearch v9.2.0 --strip-title-prefix