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
: Optional: Turn off extraction of release notes from PR or issue descriptions.
33
-
: The extractor looks for content in various formats in the PR or issue description:
34
-
: - `Release Notes: ...`
35
-
: - `Release-Notes: ...`
36
-
: - `release notes: ...`
37
-
: - `Release Note: ...`
38
-
: - `Release Notes - ...`
39
-
: - `## Release Note` (as a markdown header)
40
-
: Matched release note text is used as the changelog description (only if `--description` is not explicitly provided). The changelog title is always taken from `--title` or from the PR or issue title, not from the release note section.
41
-
: By default, the behavior is determined by the `extract.release_notes` changelog configuration setting.
33
+
: By default, the behavior is determined by the [extract.release_notes](/contribute/configure-changelogs-ref.md#extract) changelog configuration setting.
: Products affected in format "product target lifecycle, ..." (for example, `"elasticsearch 9.2.0 ga, cloud-serverless 2025-08-05"`).
77
69
: The valid product identifiers are listed in [products.yml](https://github.com/elastic/docs-builder/blob/main/config/products.yml).
78
70
: The valid lifecycles are listed in [ChangelogConfiguration.cs](https://github.com/elastic/docs-builder/blob/main/src/services/Elastic.Documentation.Services/Changelog/ChangelogConfiguration.cs).
79
-
: **Precedence when `--products` is not specified:** products are derived from PR/issue labels via `pivot.products` label mappings (if configured), then from `products.default` in `changelog.yml`, and finally inferred from the current git repository name. An error is raised if no products can be determined by any of these means.
80
-
: Refer to [Products resolution](#products-resolution) in the how-to guide for full details.
71
+
: For more information about the valid product and lifecycle values, go to [Product format](#product-format).
81
72
82
73
`--prs <string[]?>`
83
74
: Optional: Pull request URLs or numbers (comma-separated), or a path to a newline-delimited file containing PR URLs or numbers. Can be specified multiple times.
: The valid types are listed in [ChangelogConfiguration.cs](https://github.com/elastic/docs-builder/blob/main/src/services/Elastic.Documentation.Services/Changelog/ChangelogConfiguration.cs).
124
115
125
116
`--use-pr-number`
126
-
: Optional: Use PR numbers for filenames instead of the configured `filename` strategy. With both `--prs` (which creates one changelog per specified PR) and `--issues` (which creates one changelog per specified issue), each changelog filename will be derived from its PR numbers. Requires `--prs` or `--issues`. Mutually exclusive with `--use-issue-number`.
117
+
: Optional: Use PR numbers for filenames instead of the configured `filename` strategy.
118
+
: Requires `--prs` or `--issues`.
119
+
: Mutually exclusive with `--use-issue-number`.
120
+
: Refer to [](#filenames).
127
121
128
122
`--use-issue-number`
129
-
: Optional: Use issue numbers for filenames instead of the configured `filename` strategy. With both `--prs` (which creates one changelog per specified PR) and `--issues` (which creates one changelog per specified issue), each changelog filename will be derived from its issues. Requires `--prs` or `--issues`. Mutually exclusive with `--use-pr-number`.
123
+
: Optional: Use issue numbers for filenames instead of the configured `filename` strategy.
124
+
: Requires `--prs` or `--issues`.
125
+
: Mutually exclusive with `--use-pr-number`.
126
+
: Refer to [](#filenames).
127
+
128
+
## Filenames
129
+
130
+
By default, output files are named according to the `filename` strategy in `changelog.yml`:
131
+
132
+
| Strategy | Example filename | Description |
133
+
|---|---|---|
134
+
|`timestamp` (default) |`1735689600-fixes-enrich-and-lookup-join-resolution.yaml`| Uses a Unix timestamp with a sanitized title slug. |
135
+
|`pr`|`137431.yaml`| Uses the PR number. |
136
+
|`issue`|`2571.yaml`| Uses the issue number. |
137
+
138
+
Refer to [changelog.example.yml](https://github.com/elastic/docs-builder/blob/main/config/changelog.example.yml) or [](/contribute/configure-changelogs-ref.md).
139
+
140
+
You can override those settings with the `--use-pr-number` or `--use-issue-number` CLI flags:
141
+
142
+
```sh
143
+
docs-builder changelog add \
144
+
--prs 1234 \
145
+
--products "elasticsearch 9.2.3" \
146
+
--use-pr-number
147
+
148
+
docs-builder changelog add \
149
+
--issues 4567 \
150
+
--products "elasticsearch 9.3.0" \
151
+
--use-issue-number
152
+
```
153
+
154
+
:::{important}
155
+
`--use-pr-number` and `--use-issue-number` are mutually exclusive; specify only one. Each requires `--prs` or `--issues`. The numbers are extracted from the URLs or identifiers you provide or from linked references in the issue or PR body when extraction is enabled.
The `--products` command option accepts values with the format `"product target lifecycle, ..."` where:
163
+
164
+
-`product` is a product ID that exists in [products.yml](https://github.com/elastic/docs-builder/blob/main/config/products.yml) (required)
165
+
-`target` is the target version or date (optional)
166
+
-`lifecycle` exists in [Lifecycle.cs](https://github.com/elastic/docs-builder/blob/main/src/Elastic.Documentation/Lifecycle.cs) (optional)
167
+
168
+
You can further limit the possible values with the [products](/contribute/configure-changelogs-ref.md#products) and [lifecycles](/contribute/configure-changelogs-ref.md#lifecycles) options in the changelog configuration file.
The `changelog add` command resolves product values in the following order:
177
+
178
+
1. The `--products` CLI option always takes priority.
179
+
1. If `pivot.products` is defined in the changelog configuration file and the PR or issue has labels that match, those products are used. Multiple matching entries are all applied.
180
+
1. If `products.default` is defined in the changelog configuration file, those default products are used.
181
+
1. If `--repo` is specified (or `bundle.repo` is set in the changelog configuration file), the repository name is matched against known product IDs in `products.yml` and the derived value is used.
182
+
183
+
If none of these steps yield at least one product, the command returns an error.
184
+
185
+
## Configuration checks
186
+
187
+
By default, the command checks the following path for a configuration file: `docs/changelog.yml`.
188
+
You can specify a different path with the `--config` command option.
189
+
190
+
If a configuration file exists, the command validates its values before generating changelog files:
191
+
192
+
- If the configuration file contains `lifecycles`, `products`, `subtype`, or `type` values that don't match the values in `ChangelogEntryType.cs`, `ChangelogEntrySubtype.cs`, or `Lifecycle.cs`, validation fails.
193
+
- If the configuration file contains `areas` values and they don't match what you specify in the `--areas` command option, validation fails.
194
+
- If the configuration file contains `lifecycles` or `products` values that are a subset of the available values and you try to create a changelog with values outside that subset, validation fails.
195
+
196
+
In each of these cases where validation fails, a changelog file is not created.
197
+
198
+
If the configuration file contains `rules.create` definitions and a PR or issue has a blocking label, that PR is skipped and no changelog file is created for it.
199
+
For more information, refer to [Rules for creation and publishing](/contribute/configure-changelogs.md#rules).
200
+
130
201
131
202
## CI auto-detection [ci-auto-detection]
132
203
@@ -157,31 +228,3 @@ This allows the CI action to invoke `changelog add` with a minimal command line:
2.**`pivot.products` label mapping** — if `pivot.products` is configured and the PR or issue has labels that match, those products are used. Multiple matching entries are all applied.
167
-
3.**`products.default` in `changelog.yml`** — the configured default products are used.
168
-
4.**Repository name inference** — if `--repo` is specified (or `bundle.repo` is set in `changelog.yml`), the repository name is matched against known product IDs in `products.yml`.
169
-
5.**Error** — if none of the above resolves to at least one product, an error is raised.
170
-
171
-
Product-specific `rules.create` rules are evaluated *after* products are resolved from labels, so label-derived products correctly participate in per-product create rule checks.
172
-
173
-
## Configuration checks
174
-
175
-
By default, the command checks the following path for a configuration file: `docs/changelog.yml`.
176
-
You can specify a different path with the `--config` command option.
177
-
178
-
If a configuration file exists, the command validates its values before generating changelog files:
179
-
180
-
- If the configuration file contains `lifecycles`, `products`, `subtype`, or `type` values that don't match the values in `ChangelogEntryType.cs`, `ChangelogEntrySubtype.cs`, or `Lifecycle.cs`, validation fails.
181
-
- If the configuration file contains `areas` values and they don't match what you specify in the `--areas` command option, validation fails.
182
-
- If the configuration file contains `lifecycles` or `products` values that are a subset of the available values and you try to create a changelog with values outside that subset, validation fails.
183
-
184
-
In each of these cases where validation fails, a changelog file is not created.
185
-
186
-
If the configuration file contains `rules.create` definitions and a PR or issue has a blocking label, that PR is skipped and no changelog file is created for it.
187
-
For more information, refer to [Rules for creation and publishing](/contribute/configure-changelogs.md#rules).
Copy file name to clipboardExpand all lines: docs/cli/changelog/bundle.md
+22-3Lines changed: 22 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,7 +93,7 @@ You must choose one method for determining what's in the bundle (`--all`, `--inp
93
93
94
94
`--input-products <List<ProductInfo>?>`
95
95
: Filter by products in the format "product target lifecycle, ...".
96
-
: For more information about the valid product and lifecycle values, go to [Product format](/contribute/create-changelogs.md#product-format).
96
+
: For more information about the valid product and lifecycle values, go to [Product format](#product-format).
97
97
: When specified, all three parts (product, target, lifecycle) are required but can be wildcards (`*`). Multiple comma-separated values are combined with OR: a changelog is included if it matches any of the specified product/target/lifecycle combinations. For example:
98
98
99
99
-`"cloud-serverless 2025-12-02 ga, cloud-serverless 2025-12-06 beta"` — include changelogs for either cloud-serverless 2025-12-02 ga or cloud-serverless 2025-12-06 beta
@@ -122,6 +122,7 @@ The `--input-products` option determines which changelog files are gathered for
122
122
`--output-products <List<ProductInfo>?>`
123
123
: Optional: Explicitly set the products array in the output file in format "product target lifecycle, ...".
124
124
: This value replaces information that would otherwise be derived from changelogs.
125
+
: For more information about the valid product and lifecycle values, go to [Product format](#product-format).
125
126
: When `rules.bundle.products` per-product overrides are configured, `--output-products` also supplies the product IDs used to choose the **rule context product** (first alphabetically) for Mode 3. To use a different product's rules, run a separate bundle with only that product in `--output-products`. For details, refer to [Product-specific bundle rules](/contribute/configure-changelogs-ref.md#rules-bundle-products).
126
127
127
128
`--no-release-date`
@@ -211,6 +212,22 @@ If you specify a file path with a different extension (not `.yml` or `.yaml`), t
211
212
Setting `bundle.directory` and `bundle.output_directory` in `changelog.yml` is recommended so you don't need to rely on running the command from a specific directory.
212
213
:::
213
214
215
+
## Product format
216
+
217
+
The `changelog bundle` command has `--input-products` and `--output-products` options that accept values with the format `"product target lifecycle, ..."` where:
218
+
219
+
-`product` is the product ID from [products.yml](https://github.com/elastic/docs-builder/blob/main/config/products.yml) (required)
220
+
-`target` is the target version or date (optional)
221
+
-`lifecycle` exists in [Lifecycle.cs](https://github.com/elastic/docs-builder/blob/main/src/Elastic.Documentation/Lifecycle.cs) (optional)
222
+
223
+
You can further limit the possible values with the [products](/contribute/configure-changelogs-ref.md#products) and [lifecycles](/contribute/configure-changelogs-ref.md#lifecycles) options in the changelog configuration file.
## Repository name in bundles [changelog-bundle-repo]
215
232
216
233
The repository name is stored in each bundle product entry to ensure that PR and issue links are generated correctly when the bundle is rendered.
@@ -439,6 +456,7 @@ If you're using profile-based commands, they're affected by the following fields
439
456
: Not used when the filter comes from a promotion report, URL list file, or `source: github_release` — in those cases the PR or issue list determines what's included and `products` is ignored.
440
457
: Supports `{version}` and `{lifecycle}` placeholders that are substituted at runtime.
The `products` field determines which changelog files are gathered for consideration. **`rules.bundle` still applies** afterward (see the note under [`--input-products`](#options)). Input stage and bundle filtering stage are conceptually separate.
@@ -457,6 +475,7 @@ The `products` field determines which changelog files are gathered for considera
457
475
: The `{lifecycle}` placeholder is substituted at runtime with the inferred lifecycle. For `source: github_release` profiles this comes from the release tag suffix. For standard profiles it comes from the version argument. Refer to [](#changelog-bundle-standard-profile-lifecycle) and [](#changelog-bundle-github-release-profile) for details.
458
476
: If you omit lifecycle from the pattern (for example, `"elasticsearch {version}"`), the lifecycle field is omitted from the products array entirely.
459
477
: Example: `"elasticsearch {version} {lifecycle}"`or `"elasticsearch {version} ga"` to hardcode GA regardless of tag.
478
+
: Refer to [](#product-format).
460
479
461
480
`repo`
462
481
: Optional. The GitHub repository name written to each product entry in the bundle. Used by the `{changelog}` directive to generate correct PR/issue links. Only needed when the product ID doesn't match the GitHub repository name. Overrides `bundle.repo` when set. Required when `source: github_release` is used and no `bundle.repo` default is set.
@@ -481,7 +500,7 @@ If your configuration file defines a standard profile (that is to say, not a Git
481
500
| `9.2.0-alpha.1` | `preview` |
482
501
| `9.2.0-preview.1` | `preview` |
483
502
484
-
For more information about acceptable product and lifecycle values, go to [Product format](/contribute/create-changelogs.md#product-format).
503
+
For more information about acceptable product and lifecycle values, go to [Product format](#product-format).
485
504
486
505
You can invoke those profiles with commands like this:
487
506
@@ -664,4 +683,4 @@ gh-release:
664
683
```
665
684
666
685
By default all changelogs that match PRs in the GitHub release notes are included in the bundle.
667
-
To apply additional filtering by the changelog type, areas, or products, add `rules.bundle` [filters](#changelog-bundle-rules).
686
+
To apply additional filtering by the changelog type, areas, or products, add `rules.bundle` [filters](#changelog-bundle-rules).
1. Include all changelogs that have the `cloud-serverless` product identifier with target dates of either December 2 2025 (lifecycle `ga`) or December 6 2025 (lifecycle `beta`). For more information about product values, refer to [Product format](/contribute/create-changelogs.md#product-format).
264
+
1. Include all changelogs that have the `cloud-serverless` product identifier with target dates of either December 2 2025 (lifecycle `ga`) or December 6 2025 (lifecycle `beta`). For more information about product values, refer to [Product format](/cli/changelog/bundle.md#product-format).
0 commit comments