You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
: Required: GitHub repository in `owner/repo` format (for example, `elastic/elasticsearch`) or just the repository name (for example, `elasticsearch`), which defaults to `elastic` as the owner.
21
+
22
+
`version`
23
+
: Optional: The release tag to fetch (for example, `v9.2.0` or `9.2.0`). Defaults to `latest`.
24
+
25
+
## Options
26
+
27
+
`--config <string?>`
28
+
: Optional: Path to the changelog.yml configuration file. Defaults to `docs/changelog.yml`.
29
+
30
+
`--output <string?>`
31
+
: Optional: Output directory for the generated changelog files. Defaults to `./changelogs`.
32
+
33
+
`--strip-title-prefix`
34
+
: 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.
35
+
: For example, `"[Inference API] New embedding model support"` becomes `"New embedding model support"`.
36
+
: Multiple bracket prefixes are also supported (for example, `"[Discover][ESQL] Fix filtering"` becomes `"Fix filtering"`).
37
+
38
+
`--warn-on-type-mismatch`
39
+
: 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`.
40
+
41
+
## Output
42
+
43
+
The command creates two types of output in the directory specified by `--output`:
44
+
45
+
- One YAML changelog file per pull request found in the release notes.
46
+
- A `changelog-bundle.yaml` file that references all created changelog files.
47
+
48
+
The product, target version, and lifecycle are inferred automatically from the release tag and the repository name (via [products.yml](https://github.com/elastic/docs-builder/blob/main/config/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`.
Copy file name to clipboardExpand all lines: docs/contribute/changelog.md
+25-1Lines changed: 25 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,7 @@ To use the `docs-builder changelog` commands in your development workflow:
24
24
1. Optional: Add labels to your GitHub pull requests to indicate that they are not notable and should not generate changelogs. For example, `non-issue` or `release_notes:skip`. Alternatively, you can assume that all PRs are *not* notable unless a specific label is present (for example, `@Public`).
25
25
1.[Configure changelog settings](#changelog-settings) to correctly interpret your PR labels.
26
26
1.[Create changelogs](#changelog-add) with the `docs-builder changelog add` command.
27
+
- Alternatively, use the `docs-builder changelog gh-release` command as a one-shot alternative that creates changelog files and a bundle directly from a GitHub release. Refer to [Create changelogs from a GitHub release](#changelog-gh-release).
27
28
1.[Create changelog bundles](#changelog-bundle) with the `docs-builder changelog bundle` command. For example, create a bundle for the pull requests that are included in a product release.
28
29
1.[Create documentation](#render-changelogs) with the `docs-builder changelog render` command.
29
30
@@ -480,6 +481,26 @@ docs-builder changelog add \
480
481
481
482
This creates one changelog file for each PR specified, whether from files or directly.
482
483
484
+
## Create changelogs from a GitHub release [changelog-gh-release]
485
+
486
+
If you use [Release Drafter](https://github.com/release-drafter/release-drafter) or a similar tool to generate GitHub release notes that reference pull requests, you can use the `docs-builder changelog gh-release` command as a one-shot alternative to `changelog add` + `changelog bundle`.
487
+
The command parses the release notes, creates one changelog file per pull request found, and creates a `changelog-bundle.yaml` file — all in a single step.
488
+
489
+
For up-to-date command usage information, use the `-h` option or refer to [](/cli/release/changelog-gh-release.md).
The product, target version, and lifecycle are inferred automatically from the release tag and the repository name.
498
+
For example, a tag of `v9.2.0` on `elasticsearch` creates changelogs with `product: elasticsearch`, `target: 9.2.0`, and `lifecycle: ga`.
499
+
500
+
:::{note}
501
+
This command requires a `GITHUB_TOKEN` or `GH_TOKEN` environment variable (or an active `gh` login) to fetch release details from the GitHub API. Refer to [Authorization](#authorization) for details.
502
+
:::
503
+
483
504
## Create bundles [changelog-bundle]
484
505
485
506
You can use the `docs-builder changelog bundle` command to create a YAML file that lists multiple changelogs.
### Filter by pull request file [changelog-bundle-file]
684
705
685
-
If you have a file that lists pull requests (such as PRs associated with a GitHub release):
706
+
If you have a file that lists pull requests (such as PRs associated with a GitHub release), you can pass it to `--prs`.
707
+
If your release uses Release Drafter-style notes, you can also let the tool fetch and parse the PR list directly with `docs-builder changelog gh-release`. Refer to [Create changelogs from a GitHub release](#changelog-gh-release).
0 commit comments