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
+58Lines changed: 58 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,8 +78,17 @@ If a configuration file exists, the command validates all its values before gene
78
78
- If the configuration file contains `lifecycle`, `product`, `subtype`, or `type` values that don't match the values in`products.yml` and `ChangelogConfiguration.cs`, validation fails. The changelog file is not created.
79
79
- If the configuration file contains `areas` values and they don't match what you specify in the `--areas` command option, validation fails. The changelog file is not created.
80
80
81
+
### GitHub label mappings
82
+
83
+
You can optionally add `label_to_type` and `label_to_areas` mappings in your changelog configuration.
84
+
When you run the command with the `--pr` option, it can use these mappings to fill in the `type` and `areas` in your changelog based on your pull request labels.
85
+
86
+
Refer to [changelog.yml.example](https://github.com/elastic/docs-builder/blob/main/config/changelog.yml.example).
87
+
81
88
## Examples
82
89
90
+
### Multiple products
91
+
83
92
The following command creates a changelog for a bug fix that applies to two products:
84
93
85
94
```sh
@@ -110,3 +119,52 @@ title: Fixes enrich and lookup join resolution based on minimum transport versio
110
119
areas:
111
120
- ES|QL
112
121
```
122
+
123
+
### PR label mappings
124
+
125
+
You can update your changelog configuration file to contain GitHub label mappings, for example:
126
+
127
+
```yaml
128
+
# Available areas (optional - if not specified, all areas are allowed)
129
+
available_areas:
130
+
- search
131
+
- security
132
+
- machine-learning
133
+
- observability
134
+
- index-management
135
+
- ES|QL
136
+
# Add more areas as needed
137
+
138
+
# GitHub label mappings (optional - used when --pr option is specified)
139
+
# Maps GitHub PR labels to changelog type values
140
+
# When a PR has a label that matches a key, the corresponding type value is used
141
+
label_to_type:
142
+
# Example mappings - customize based on your label naming conventions
143
+
">enhancement": enhancement
144
+
">breaking": breaking-change
145
+
146
+
# Maps GitHub PR labels to changelog area values
147
+
# Multiple labels can map to the same area, and a single label can map to multiple areas (comma-separated)
148
+
label_to_areas:
149
+
# Example mappings - customize based on your label naming conventions
150
+
":Search Relevance/ES|QL": "ES|QL"
151
+
```
152
+
153
+
When you use the `--pr` option to derive information from a pull request, it can make use of those mappings:
0 commit comments