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
Copy file name to clipboardExpand all lines: docs/contribute/changelog.md
+48-67Lines changed: 48 additions & 67 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,7 @@ By adding a file for each notable change and grouping them into bundles, you can
4
4
5
5
1. Create changelogs with the `docs-builder changelog add` command.
6
6
2.[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.
7
+
3.[Create documentation](#render-changelogs) with the `docs-builder changelog render` command.
7
8
8
9
For more information about running `docs-builder`, go to [Contribute locally](https://www.elastic.co/docs/contribute-docs/locally).
9
10
@@ -244,88 +245,68 @@ entries:
244
245
...
245
246
```
246
247
247
-
## Examples
248
+
## Create documentation [render-changelogs]
248
249
249
-
### Create a changelog for multiple products
250
-
251
-
The following command creates a changelog for a bug fix that applies to two products:
250
+
The `docs-builder changelog render` command creates markdown files from changelog bundles for documentation purposes.
251
+
For up-to-date details, use the `-h` command option:
252
252
253
253
```sh
254
-
docs-builder changelog add \
255
-
--title "Fixes enrich and lookup join resolution based on minimum transport version" \ <1>
1. This option is required only if you want to override what's derived from the PR title.
263
-
2. The type values are defined in [ChangelogConfiguration.cs](https://github.com/elastic/docs-builder/blob/main/src/services/Elastic.Documentation.Services/Changelog/ChangelogConfiguration.cs).
264
-
3. The product values are defined in [products.yml](https://github.com/elastic/docs-builder/blob/main/config/products.yml).
265
-
4. The `--pr` value can be a full URL (such as `https://github.com/owner/repo/pull/123`, a short format (such as `owner/repo#123`) or just a number (in which case you must also provide `--owner` and `--repo` options).
256
+
Options:
257
+
--input <List<BundleInput>> Required: Bundle input(s) in format "bundle-file-path, changelog-file-path, repo". Can be specified multiple times. Only bundle-file-path is required. [Required]
258
+
--output <string?> Optional: Output directory for rendered markdown files. Defaults to current directory [Default: null]
259
+
--title <string?> Optional: Title to use for section headers in output markdown files. Defaults to version from first bundle [Default: null]
260
+
--subsections Optional: Group entries by area/component in subsections. Defaults to false
261
+
```
266
262
267
-
The output file has the following format:
263
+
Before you can use this command you must create changelog files and collect them into bundles.
264
+
For example, the `docs-builder changelog bundle` command creates a file like this:
When you use the `--pr` option to derive information from a pull request, it can make use of those mappings:
292
+
1. Provide information about the changelog bundle. The format is `"<bundle-file-path>, <changelog-file-path>, <repository>"`. Only the `<bundle-file-path>` is required. The `<changelog-file-path>` is useful if the changelogs are not in the default directory and are not resolved within the bundle. The `<repository>` is useful for PR or issue link checks. You can specify `--input` multiple times to merge multiple bundles.
293
+
2. The `--title` value is used for an output folder name and for section titles in the markdown files. If you omit `--title` and the first bundle contains a product `target` value, that value is used. Otherwise, if none of the bundles have product `target` fields, the title defaults to "unknown".
294
+
3. By default the command creates the output files in the current directory.
295
+
4. By default the changelog areas are not displayed in the output. Add `--subsections` to group changelog details by their `areas`.
0 commit comments