Skip to content

Commit 4b6c56e

Browse files
Add docs-builder release-notes create command (#2298)
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
1 parent 9e8b325 commit 4b6c56e

File tree

10 files changed

+633
-0
lines changed

10 files changed

+633
-0
lines changed

config/changelog.yml.example

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Changelog Configuration
2+
# This file configures the valid values for changelog fields.
3+
# Place this file as `changelog.yml` in the `docs/` directory
4+
5+
# Available types for changelog entries
6+
available_types:
7+
- feature
8+
- enhancement
9+
- bug-fix
10+
- known-issue
11+
- breaking-change
12+
- deprecation
13+
- docs
14+
- regression
15+
- security
16+
- other
17+
18+
# Available subtypes for breaking changes
19+
available_subtypes:
20+
- api
21+
- behavioral
22+
- configuration
23+
- dependency
24+
- subscription
25+
- plugin
26+
- security
27+
- other
28+
29+
# Available lifecycle values
30+
available_lifecycles:
31+
- preview
32+
- beta
33+
- ga
34+
35+
# Available areas (optional - if not specified, all areas are allowed)
36+
available_areas:
37+
- search
38+
- security
39+
- machine-learning
40+
- observability
41+
- index-management
42+
# Add more areas as needed
43+
44+
# Available products (optional - if not specified, all products are allowed)
45+
available_products:
46+
- elasticsearch
47+
- kibana
48+
- apm
49+
- beats
50+
- elastic-agent
51+
- fleet
52+
- cloud-hosted
53+
- cloud-serverless
54+
- cloud-enterprise
55+
# Add more products as needed
56+
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// Licensed to Elasticsearch B.V under one or more agreements.
2+
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3+
// See the LICENSE file in the project root for more information
4+
5+
namespace Elastic.Documentation.Services.Changelog;
6+
7+
/// <summary>
8+
/// Configuration for changelog generation
9+
/// </summary>
10+
public class ChangelogConfiguration
11+
{
12+
public List<string> AvailableTypes { get; set; } =
13+
[
14+
"feature",
15+
"enhancement",
16+
"bug-fix",
17+
"known-issue",
18+
"breaking-change",
19+
"deprecation",
20+
"docs",
21+
"regression",
22+
"security",
23+
"other"
24+
];
25+
26+
public List<string> AvailableSubtypes { get; set; } =
27+
[
28+
"api",
29+
"behavioral",
30+
"configuration",
31+
"dependency",
32+
"subscription",
33+
"plugin",
34+
"security",
35+
"other"
36+
];
37+
38+
public List<string> AvailableLifecycles { get; set; } =
39+
[
40+
"preview",
41+
"beta",
42+
"ga"
43+
];
44+
45+
public List<string>? AvailableAreas { get; set; }
46+
47+
public List<string>? AvailableProducts { get; set; }
48+
49+
public static ChangelogConfiguration Default => new();
50+
}
51+
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Licensed to Elasticsearch B.V under one or more agreements.
2+
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3+
// See the LICENSE file in the project root for more information
4+
5+
namespace Elastic.Documentation.Services.Changelog;
6+
7+
/// <summary>
8+
/// Data structure for changelog YAML file matching the exact schema
9+
/// </summary>
10+
public class ChangelogData
11+
{
12+
// Automated fields
13+
public string? Pr { get; set; }
14+
public List<string>? Issues { get; set; }
15+
public string Type { get; set; } = string.Empty;
16+
public string? Subtype { get; set; }
17+
public List<ProductInfo> Products { get; set; } = [];
18+
public List<string>? Areas { get; set; }
19+
20+
// Non-automated fields
21+
public string Title { get; set; } = string.Empty;
22+
public string? Description { get; set; }
23+
public string? Impact { get; set; }
24+
public string? Action { get; set; }
25+
public string? FeatureId { get; set; }
26+
public bool? Highlight { get; set; }
27+
}
28+
29+
public class ProductInfo
30+
{
31+
public string Product { get; set; } = string.Empty;
32+
public string? Target { get; set; }
33+
public string? Lifecycle { get; set; }
34+
}
35+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Licensed to Elasticsearch B.V under one or more agreements.
2+
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3+
// See the LICENSE file in the project root for more information
4+
5+
namespace Elastic.Documentation.Services.Changelog;
6+
7+
/// <summary>
8+
/// Input data for creating a changelog fragment
9+
/// </summary>
10+
public class ChangelogInput
11+
{
12+
public required string Title { get; set; }
13+
public required string Type { get; set; }
14+
public required List<ProductInfo> Products { get; set; }
15+
public string? Subtype { get; set; }
16+
public string[] Areas { get; set; } = [];
17+
public string? Pr { get; set; }
18+
public string[] Issues { get; set; } = [];
19+
public string? Description { get; set; }
20+
public string? Impact { get; set; }
21+
public string? Action { get; set; }
22+
public string? FeatureId { get; set; }
23+
public bool? Highlight { get; set; }
24+
public string? Output { get; set; }
25+
public string? Config { get; set; }
26+
}
27+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Licensed to Elasticsearch B.V under one or more agreements.
2+
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3+
// See the LICENSE file in the project root for more information
4+
5+
using YamlDotNet.Serialization;
6+
7+
namespace Elastic.Documentation.Services.Changelog;
8+
9+
[YamlStaticContext]
10+
[YamlSerializable(typeof(ChangelogData))]
11+
[YamlSerializable(typeof(ProductInfo))]
12+
[YamlSerializable(typeof(ChangelogConfiguration))]
13+
public partial class ChangelogYamlStaticContext;
14+

0 commit comments

Comments
 (0)