Skip to content

Commit d577134

Browse files
committed
More layout edits
1 parent fc8a037 commit d577134

File tree

2 files changed

+69
-42
lines changed

2 files changed

+69
-42
lines changed

src/services/Elastic.Documentation.Services/Changelog/ChangelogConfiguration.cs

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,35 @@ public class ChangelogConfiguration
1111
{
1212
public List<string> AvailableTypes { get; set; } =
1313
[
14-
"feature",
15-
"enhancement",
16-
"bug-fix",
17-
"known-issue",
18-
"breaking-change",
19-
"deprecation",
20-
"docs",
21-
"regression",
22-
"security",
23-
"other"
14+
"feature", // A new feature or enhancement.
15+
"enhancement", // An improvement to an existing feature.
16+
"bug-fix", // A bug fix.
17+
"known-issue", // A problem that is known to exist in the product.
18+
"breaking-change", // A breaking change to the documented behavior of the product.
19+
"deprecation", // Functionality that is deprecated and will be removed in a future release.
20+
"docs", // Major documentation changes or reorganizations.
21+
"regression", // Functionality that no longer works or behaves incorrectly.
22+
"security", // An advisory about a potentialsecurity vulnerability.
23+
"other" // Changes that do not fit into any of the other categories.
2424
];
2525

2626
public List<string> AvailableSubtypes { get; set; } =
2727
[
28-
"api",
29-
"behavioral",
30-
"configuration",
31-
"dependency",
32-
"subscription",
33-
"plugin",
34-
"security",
35-
"other"
28+
"api", // A change that breaks an API.
29+
"behavioral", // A change that breaks the way something works.
30+
"configuration", // A change that breaks the configuration.
31+
"dependency", // A change that breaks a dependency, such as a third-party product.
32+
"subscription", // A change that breaks licensing behavior.
33+
"plugin", // A change that breaks a plugin.
34+
"security", // A change that breaks authentication, authorization, or permissions.
35+
"other" // A breaking change that do not fit into any of the other categories.
3636
];
3737

3838
public List<string> AvailableLifecycles { get; set; } =
3939
[
40-
"preview",
41-
"beta",
42-
"ga"
40+
"preview", // A technical preview of a feature or enhancement.
41+
"beta", // A beta release of a feature or enhancement.
42+
"ga", // A generally available release of a feature or enhancement.
4343
];
4444

4545
public List<string>? AvailableAreas { get; set; }

src/services/Elastic.Documentation.Services/ChangelogService.cs

Lines changed: 48 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -234,50 +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}"));
240238

241239
// Build lifecycles list
242-
var lifecyclesList = string.Join("\n", config.AvailableLifecycles.Select(l => $"# - {l}"));
240+
var lifecyclesList = string.Join("\n", config.AvailableLifecycles.Select(l => $"# - {l}"));
243241

244242
// Add schema comments using raw string literal
245243
var result = $"""
246244
##### Required fields #####
247245
248-
# title: A required string that is a short, user-facing headline (Max 80 characters)
246+
# title:
247+
# A required string that is a short, user-facing headline.
248+
# (Max 80 characters)
249249
250-
# type: A required string that contains the type of change
250+
# type:
251+
# A required string that contains the type of change
251252
# It can be one of:
252253
{typesList}
253254
254-
# products: A required array of objects that denote the affected products
255+
# products:
256+
# A required array of objects that denote the affected products
255257
# Each product object contains:
256-
257-
# - product: A required string with a valid product ID, defined in https://github.com/elastic/docs-builder/blob/main/config/products.yml
258-
# target: An optional string with the target version or date
259-
# lifecycle: An optional string for new features or enhancements that have a specific availability.
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.
260268
# It can be one of:
261269
{lifecyclesList}
262-
270+
263271
##### Optional fields #####
264272
265-
# action: An optional string that describes what users must do to mitigate the impact of a breaking change or known issue.
273+
# action:
274+
# An optional string that describes what users must do to mitigate
275+
# the impact of a breaking change or known issue.
266276
267-
# areas: An optional array of strings that denotes the parts/components/services of the product that are affected.
277+
# areas:
278+
# An optional array of strings that denotes the parts/components/services
279+
# of the product that are affected.
268280
269-
# description: An optional string that provides additional information (Max 600 characters).
281+
# description:
282+
# An optional string that provides additional information.
283+
# (Max 600 characters).
270284
271-
# feature-id: An optional string to associate a feature or enhanceent with a unique feature flag.
285+
# feature-id:
286+
# An optional string to associate a feature or enhanceent with a
287+
# unique feature flag.
272288
273-
# highlight: An optional boolean for items that should be included in release highlights or the UI to draw user attention.
289+
# highlight:
290+
# An optional boolean for items that should be included in release
291+
# highlights or the UI to draw user attention.
274292
275-
# impact: An optional string that describes how the user's environment is affected by a breaking change or known issue.
293+
# impact:
294+
# An optional string that describes how the user's environment is
295+
# affected by a breaking change or known issue.
276296
277-
# issues: An optional array of strings that contain the issues that are relevant to the PR
297+
# issues:
298+
# An optional array of strings that contain the issues that are
299+
# relevant to the PR.
278300
279-
# pr: An optional string that contains the pull request number
280-
# subtype: An optional string that applies only to breaking changes{subtypesList}
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}
281308
282309
{yaml}
283310
""";

0 commit comments

Comments
 (0)