@@ -234,39 +234,77 @@ private string GenerateYaml(ChangelogData data, ChangelogConfiguration config)
234234 var typesList = string . Join ( "\n " , config . AvailableTypes . Select ( t => $ "# - { t } ") ) ;
235235
236236 // Build subtypes list
237- var subtypesList = config . AvailableSubtypes . Count > 0
238- ? "\n # It can be one of:\n " + string . Join ( "\n " , config . AvailableSubtypes . Select ( s => $ "# - { s } ") )
239- : string . Empty ;
237+ var subtypesList = string . Join ( "\n " , config . AvailableSubtypes . Select ( s => $ "# - { s } ") ) ;
238+
239+ // Build lifecycles list
240+ var lifecyclesList = string . Join ( "\n " , config . AvailableLifecycles . Select ( l => $ "# - { l } ") ) ;
240241
241242 // Add schema comments using raw string literal
242243 var result = $ """
243- ##### Automated fields #####
244+ ##### Required fields #####
244245
245- # These fields are likely generated when the changelog is created and unlikely to require edits
246+ # title:
247+ # A required string that is a short, user-facing headline.
248+ # (Max 80 characters)
246249
247- # pr: An optional string that contains the pull request number
248- # issues: An optional array of strings that contain URLs for issues that are relevant to the PR
249- # type: A required string that contains the type of change
250+ # type:
251+ # A required string that contains the type of change
250252 # It can be one of:
251253 { typesList }
252- # subtype: An optional string that applies only to breaking changes{ subtypesList }
253- # products: A required array of objects that denote the affected products
254- # Each product object contains:
255- # - product: A required string with a predefined product ID
256- # - target: An optional string with the target version or date
257- # - lifecycle: An optional string (preview, beta, ga)
258- # areas: An optional array of strings that denotes the parts/components/services affected
259-
260- ##### Non-automated fields #####
261254
262- # These fields might be generated when the changelog is created but are likely to require edits
263-
264- # title: A required string that is a short, user-facing headline (Max 80 characters)
265- # description: An optional string that provides additional information (Max 600 characters)
266- # impact: An optional string that describes how the user's environment is affected
267- # action: An optional string that describes what users must do to mitigate
268- # feature-id: An optional string to associate with a unique feature flag
269- # highlight: An optional boolean for items that should be included in release highlights
255+ # products:
256+ # A required array of objects that denote the affected products
257+ # Each product object contains:
258+ #
259+ # - product:
260+ # A required string with a valid product ID.
261+ # Valid values are defined in https://github.com/elastic/docs-builder/blob/main/config/products.yml
262+ #
263+ # target:
264+ # An optional string with the target version or date.
265+ #
266+ # lifecycle:
267+ # An optional string for new features or enhancements that have a specific availability.
268+ # It can be one of:
269+ { lifecyclesList }
270+
271+ ##### Optional fields #####
272+
273+ # action:
274+ # An optional string that describes what users must do to mitigate
275+ # the impact of a breaking change or known issue.
276+
277+ # areas:
278+ # An optional array of strings that denotes the parts/components/services
279+ # of the product that are affected.
280+
281+ # description:
282+ # An optional string that provides additional information.
283+ # (Max 600 characters).
284+
285+ # feature-id:
286+ # An optional string to associate a feature or enhanceent with a
287+ # unique feature flag.
288+
289+ # highlight:
290+ # An optional boolean for items that should be included in release
291+ # highlights or the UI to draw user attention.
292+
293+ # impact:
294+ # An optional string that describes how the user's environment is
295+ # affected by a breaking change or known issue.
296+
297+ # issues:
298+ # An optional array of strings that contain the issues that are
299+ # relevant to the PR.
300+
301+ # pr:
302+ # An optional string that contains the pull request number.
303+
304+ # subtype:
305+ # An optional string that applies only to breaking changes.
306+ # It can be one of:
307+ { subtypesList }
270308
271309 { yaml }
272310 """ ;
0 commit comments