|
| 1 | +# Add changelog entries |
| 2 | + |
| 3 | +The `docs-builder changelog add` command creates a new changelog fragment file from command-line input. This is useful for creating changelog entries as part of your development workflow. |
| 4 | + |
| 5 | +## `docs-builder changelog add` |
| 6 | + |
| 7 | +Create a new changelog fragment with required and optional fields. For example: |
| 8 | + |
| 9 | +```sh |
| 10 | +docs-builder changelog add \ |
| 11 | + --title "Fixes enrich and lookup join resolution based on minimum transport version" \ |
| 12 | + --type bug-fix \ |
| 13 | + --products "elasticsearch 9.2.3, cloud-serverless 2025-12-02" \ |
| 14 | + --areas "ES|QL" |
| 15 | + --pr "https://github.com/elastic/elasticsearch/pull/137431" |
| 16 | +``` |
| 17 | + |
| 18 | +:::{important} |
| 19 | + |
| 20 | +- Product values must exist in [products.yml](https://github.com/elastic/docs-builder/blob/main/config/products.yml). Invalid products will cause the command to fail. |
| 21 | +- Type, subtype, and lifecycle values must match the available values defined in [ChangelogConfiguration.cs](https://github.com/elastic/docs-builder/blob/main/src/services/Elastic.Documentation.Services/Changelog/ChangelogConfiguration.cs). Invalid values will cause the command to fail. |
| 22 | +- The command validates all values before generating the changelog file. If validation fails, no file is created. |
| 23 | +- At this time, the PR value can be a number or a URL; it is not validated. |
| 24 | +::: |
| 25 | + |
| 26 | +## Product format |
| 27 | + |
| 28 | +The `--products` parameter accepts products in the format `"product target lifecycle, ..."` where: |
| 29 | + |
| 30 | +- `product` is the product ID from [products.yml](https://github.com/elastic/docs-builder/blob/main/config/products.yml) (required) |
| 31 | +- `target` is the target version or date (optional) |
| 32 | +- `lifecycle` is one of: `preview`, `beta`, or `ga` (optional) |
| 33 | + |
| 34 | +Examples: |
| 35 | + |
| 36 | +- `"kibana 9.2.0 ga"` |
| 37 | +- `"cloud-serverless 2025-08-05"` |
| 38 | +- `"cloud-enterprise 4.0.3, cloud-hosted 2025-10-31"` |
| 39 | + |
| 40 | +## {{dbuild}} changelog add --help |
| 41 | + |
| 42 | +```sh |
| 43 | +Usage: changelog add [options...] [-h|--help] [--version] |
| 44 | + |
| 45 | +Add a new changelog fragment from command-line input |
| 46 | + |
| 47 | +Options: |
| 48 | + --title <string> Required: A short, user-facing title (max 80 characters) (Required) |
| 49 | + --type <string> Required: Type of change (feature, enhancement, bug-fix, breaking-change, etc.) (Required) |
| 50 | + --products <List<ProductInfo>> Required: Products affected in format "product target lifecycle, ..." (e.g., "elasticsearch 9.2.0 ga, cloud-serverless 2025-08-05") (Required) |
| 51 | + --subtype <string?> Optional: Subtype for breaking changes (api, behavioral, configuration, etc.) (Default: null) |
| 52 | + --areas <string[]?> Optional: Area(s) affected (comma-separated or specify multiple times) (Default: null) |
| 53 | + --pr <string?> Optional: Pull request URL (Default: null) |
| 54 | + --issues <string[]?> Optional: Issue URL(s) (comma-separated or specify multiple times) (Default: null) |
| 55 | + --description <string?> Optional: Additional information about the change (max 600 characters) (Default: null) |
| 56 | + --impact <string?> Optional: How the user's environment is affected (Default: null) |
| 57 | + --action <string?> Optional: What users must do to mitigate (Default: null) |
| 58 | + --feature-id <string?> Optional: Feature flag ID (Default: null) |
| 59 | + --highlight <bool?> Optional: Include in release highlights (Default: null) |
| 60 | + --output <string?> Optional: Output directory for the changelog fragment. Defaults to current directory (Default: null) |
| 61 | + --config <string?> Optional: Path to the changelog.yml configuration file. Defaults to 'docs/changelog.yml' (Default: null) |
| 62 | +``` |
0 commit comments