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
collector.EmitError(string.Empty,$"Cannot derive type from PR {input.Pr} labels: no label-to-type mapping configured in changelog.yml. Please provide --type or configure label_to_type in changelog.yml.");
collector.EmitError(string.Empty,$"Cannot derive type from PR {input.Pr} labels ({availableLabels}). No matching label found in label_to_type mapping. Please provide --type or add a label mapping in changelog.yml.");
93
+
returnfalse;
68
94
}
95
+
input.Type=mappedType;
96
+
_logger.LogInformation("Mapped PR labels to type: {Type}",input.Type);
_logger.LogWarning("PR URL was provided but GitHub information could not be fetched. Continuing with provided values.");
93
-
}
94
118
95
-
// Validate required fields
119
+
// Validate required fields (must be provided either explicitly or derived from PR)
96
120
if(string.IsNullOrWhiteSpace(input.Title))
97
121
{
98
-
collector.EmitError(string.Empty,"Title is required");
122
+
collector.EmitError(string.Empty,"Title is required. Provide --title or specify --pr to derive it from the PR.");
99
123
returnfalse;
100
124
}
101
125
102
126
if(string.IsNullOrWhiteSpace(input.Type))
103
127
{
104
-
collector.EmitError(string.Empty,"Type is required");
128
+
collector.EmitError(string.Empty,"Type is required. Provide --type or specify --pr to derive it from PR labels (requires label_to_type mapping in changelog.yml).");
Copy file name to clipboardExpand all lines: src/tooling/docs-builder/Commands/ChangelogCommand.cs
+11-5Lines changed: 11 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -31,12 +31,14 @@ public Task<int> Default()
31
31
/// <summary>
32
32
/// Add a new changelog fragment from command-line input
33
33
/// </summary>
34
-
/// <param name="title">Required: A short, user-facing title (max 80 characters)</param>
35
-
/// <param name="type">Required: Type of change (feature, enhancement, bug-fix, breaking-change, etc.)</param>
34
+
/// <param name="title">Optional: A short, user-facing title (max 80 characters). Required if --pr is not specified. If --pr is specified, will be derived from PR title if not provided.</param>
35
+
/// <param name="type">Optional: Type of change (feature, enhancement, bug-fix, breaking-change, etc.). Required if --pr is not specified. If --pr is specified, will be derived from PR labels if not provided.</param>
36
36
/// <param name="products">Required: Products affected in format "product target lifecycle, ..." (e.g., "elasticsearch 9.2.0 ga, cloud-serverless 2025-08-05")</param>
/// <param name="pr">Optional: Pull request URL or PR number (if --owner and --repo are provided). If specified, --title and --type can be derived from the PR.</param>
40
+
/// <param name="owner">Optional: GitHub repository owner (used when --pr is just a number)</param>
41
+
/// <param name="repo">Optional: GitHub repository name (used when --pr is just a number)</param>
40
42
/// <param name="issues">Optional: Issue URL(s) (comma-separated or specify multiple times)</param>
41
43
/// <param name="description">Optional: Additional information about the change (max 600 characters)</param>
42
44
/// <param name="impact">Optional: How the user's environment is affected</param>
0 commit comments