Skip to content

Commit 671d199

Browse files
committed
Update docs
1 parent 87e7a52 commit 671d199

File tree

3 files changed

+38
-25
lines changed

3 files changed

+38
-25
lines changed

docs/cli/release/changelog-add.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,30 @@ docs-builder changelog add [options...] [-h|--help]
3838
`--output <string?>`
3939
: Optional: Output directory for the changelog fragment. Defaults to current directory.
4040

41+
`--owner <string?>`
42+
: Optional: GitHub repository owner (used when `--pr` is just a number).
43+
4144
`--products <List<ProductInfo>>`
4245
: Required: Products affected in format "product target lifecycle, ..." (for example, `"elasticsearch 9.2.0 ga, cloud-serverless 2025-08-05"`).
4346
: The valid product identifiers are listed in [products.yml](https://github.com/elastic/docs-builder/blob/main/config/products.yml).
4447
: The valid lifecycles are listed in [ChangelogConfiguration.cs](https://github.com/elastic/docs-builder/blob/main/src/services/Elastic.Documentation.Services/Changelog/ChangelogConfiguration.cs).
4548

4649
`--pr <string?>`
47-
: Optional: Pull request number.
50+
: Optional: Pull request URL or number (if `--owner` and `--repo` are provided).
51+
: If specified, `--title` can be derived from the PR.
52+
: If mappings are configured, `--areas` and `--type` can also be derived from the PR.
53+
54+
`--repo <string?>`
55+
: Optional: GitHub repository name (used when `--pr` is just a number).
4856

4957
`--subtype <string?>`
5058
: Optional: Subtype for breaking changes (for example, `api`, `behavioral`, or `configuration`).
5159
: The valid subtypes are listed in [ChangelogConfiguration.cs](https://github.com/elastic/docs-builder/blob/main/src/services/Elastic.Documentation.Services/Changelog/ChangelogConfiguration.cs).
5260

5361
`--title <string>`
54-
: Required: A short, user-facing title (max 80 characters)
62+
: A short, user-facing title (max 80 characters)
63+
: Required if `--pr` is not specified.
64+
: If both `--pr` and `--title` are specified, the latter value is used instead of what exists in the PR.
5565

5666
`--type <string>`
5767
: Required: Type of change (for example, `feature`, `enhancement`, `bug-fix`, or `breaking-change`).

docs/contribute/changelog.md

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,22 @@ Usage: changelog add [options...] [-h|--help] [--version]
2525
Add a new changelog fragment from command-line input
2626

2727
Options:
28-
--title <string> Required: A short, user-facing title (max 80 characters) (Required)
29-
--type <string> Required: Type of change (feature, enhancement, bug-fix, breaking-change, etc.) (Required)
30-
--products <List<ProductInfo>> Required: Products affected in format "product target lifecycle, ..." (e.g., "elasticsearch 9.2.0 ga, cloud-serverless 2025-08-05") (Required)
31-
--subtype <string?> Optional: Subtype for breaking changes (api, behavioral, configuration, etc.) (Default: null)
32-
--areas <string[]?> Optional: Area(s) affected (comma-separated or specify multiple times) (Default: null)
33-
--pr <string?> Optional: Pull request URL (Default: null)
34-
--issues <string[]?> Optional: Issue URL(s) (comma-separated or specify multiple times) (Default: null)
35-
--description <string?> Optional: Additional information about the change (max 600 characters) (Default: null)
36-
--impact <string?> Optional: How the user's environment is affected (Default: null)
37-
--action <string?> Optional: What users must do to mitigate (Default: null)
38-
--feature-id <string?> Optional: Feature flag ID (Default: null)
39-
--highlight <bool?> Optional: Include in release highlights (Default: null)
40-
--output <string?> Optional: Output directory for the changelog fragment. Defaults to current directory (Default: null)
41-
--config <string?> Optional: Path to the changelog.yml configuration file. Defaults to 'docs/changelog.yml' (Default: null)
28+
--products <List<ProductInfo>> Required: Products affected in format "product target lifecycle, ..." (e.g., "elasticsearch 9.2.0 ga, cloud-serverless 2025-08-05") [Required]
29+
--title <string?> Optional: A short, user-facing title (max 80 characters). Required if --pr is not specified. If --pr is specified, will be derived from PR title if not provided. [Default: null]
30+
--type <string?> Optional: Type of change (feature, enhancement, bug-fix, breaking-change, etc.). Required if --pr is not specified. If --pr is specified, will be derived from PR labels if not provided. [Default: null]
31+
--subtype <string?> Optional: Subtype for breaking changes (api, behavioral, configuration, etc.) [Default: null]
32+
--areas <string[]?> Optional: Area(s) affected (comma-separated or specify multiple times) [Default: null]
33+
--pr <string?> Optional: Pull request URL or PR number (if --owner and --repo are provided). If specified, --title and --type can be derived from the PR. [Default: null]
34+
--owner <string?> Optional: GitHub repository owner (used when --pr is just a number) [Default: null]
35+
--repo <string?> Optional: GitHub repository name (used when --pr is just a number) [Default: null]
36+
--issues <string[]?> Optional: Issue URL(s) (comma-separated or specify multiple times) [Default: null]
37+
--description <string?> Optional: Additional information about the change (max 600 characters) [Default: null]
38+
--impact <string?> Optional: How the user's environment is affected [Default: null]
39+
--action <string?> Optional: What users must do to mitigate [Default: null]
40+
--feature-id <string?> Optional: Feature flag ID [Default: null]
41+
--highlight <bool?> Optional: Include in release highlights [Default: null]
42+
--output <string?> Optional: Output directory for the changelog fragment. Defaults to current directory [Default: null]
43+
--config <string?> Optional: Path to the changelog.yml configuration file. Defaults to 'docs/changelog.yml' [Default: null]
4244
```
4345
4446
### Product format
@@ -82,16 +84,17 @@ The following command creates a changelog for a bug fix that applies to two prod
8284
8385
```sh
8486
docs-builder changelog add \
85-
--title "Fixes enrich and lookup join resolution based on minimum transport version" \
86-
--type bug-fix \ <1>
87-
--products "elasticsearch 9.2.3, cloud-serverless 2025-12-02" \ <2>
87+
--title "Fixes enrich and lookup join resolution based on minimum transport version" \ <1>
88+
--type bug-fix \ <2>
89+
--products "elasticsearch 9.2.3, cloud-serverless 2025-12-02" \ <3>
8890
--areas "ES|QL"
89-
--pr "https://github.com/elastic/elasticsearch/pull/137431" <3>
91+
--pr "https://github.com/elastic/elasticsearch/pull/137431" <4>
9092
```
9193
92-
1. The type values are defined in [ChangelogConfiguration.cs](https://github.com/elastic/docs-builder/blob/main/src/services/Elastic.Documentation.Services/Changelog/ChangelogConfiguration.cs).
93-
2. The product values are defined in [products.yml](https://github.com/elastic/docs-builder/blob/main/config/products.yml).
94-
3. At this time, the PR value can be a number or a URL; it is not validated.
94+
1. This option is required only if you want to override what's derived from the PR title.
95+
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).
96+
3. The product values are defined in [products.yml](https://github.com/elastic/docs-builder/blob/main/config/products.yml).
97+
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).
9598

9699
The output file has the following format:
97100

src/tooling/docs-builder/Commands/ChangelogCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ public Task<int> Default()
3131
/// <summary>
3232
/// Add a new changelog fragment from command-line input
3333
/// </summary>
34-
/// <param name="title">Optional: A short, user-facing title (max 80 characters). Required if --pr is not specified. If --pr is specified, will be derived from PR title if not provided.</param>
34+
/// <param name="title">Optional: A short, user-facing title (max 80 characters). Required if --pr is not specified. If --pr and --title are specified, the latter value is used instead of what exists in the PR.</param>
3535
/// <param name="type">Optional: Type of change (feature, enhancement, bug-fix, breaking-change, etc.). Required if --pr is not specified. If --pr is specified, will be derived from PR labels if not provided.</param>
3636
/// <param name="products">Required: Products affected in format "product target lifecycle, ..." (e.g., "elasticsearch 9.2.0 ga, cloud-serverless 2025-08-05")</param>
3737
/// <param name="subtype">Optional: Subtype for breaking changes (api, behavioral, configuration, etc.)</param>
3838
/// <param name="areas">Optional: Area(s) affected (comma-separated or specify multiple times)</param>
39-
/// <param name="pr">Optional: Pull request URL or PR number (if --owner and --repo are provided). If specified, --title and --type can be derived from the PR.</param>
39+
/// <param name="pr">Optional: Pull request URL or PR number (if --owner and --repo are provided). If specified, --title can be derived from the PR. If mappings are configured, --areas and --type can also be derived from the PR.</param>
4040
/// <param name="owner">Optional: GitHub repository owner (used when --pr is just a number)</param>
4141
/// <param name="repo">Optional: GitHub repository name (used when --pr is just a number)</param>
4242
/// <param name="issues">Optional: Issue URL(s) (comma-separated or specify multiple times)</param>

0 commit comments

Comments
 (0)