Skip to content

Commit deba5e9

Browse files
committed
Fix update dependencies from staging pipeline command for SDK-only releases (#6823)
1 parent 0b30389 commit deba5e9

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

eng/update-dependencies/FromStagingPipelineCommand.cs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,18 @@ public override async Task<int> ExecuteAsync(FromStagingPipelineOptions options)
146146
return exitCode;
147147
}
148148

149-
var commitMessage = $"Update .NET {majorMinorVersionString} to {productVersions["sdk"]} SDK / {productVersions["runtime"]} Runtime";
149+
var commitMessage = releaseConfig switch
150+
{
151+
{ SdkOnly: true } => $"Update .NET {majorMinorVersionString} SDK to {productVersions["sdk"]}",
152+
_ => $"Update .NET {majorMinorVersionString} to {productVersions["sdk"]} SDK / {productVersions["runtime"]} Runtime",
153+
};
154+
150155
var prTitle = $"[{options.TargetBranch}] {commitMessage}";
156+
var newVersionsList = productVersions.Select(kvp => $"- {kvp.Key.ToUpper()}: {kvp.Value}");
151157
var prBody = $"""
152158
This pull request updates .NET {majorMinorVersionString} to the following versions:
153159
154-
- SDK: {productVersions["sdk"]}
155-
- Runtime: {productVersions["runtime"]}
156-
- ASP.NET Core: {productVersions["aspnet"]}
160+
{string.Join(Environment.NewLine, newVersionsList)}
157161
158162
These versions are from .NET staging pipeline run [#{options.StagingPipelineRunId}]({buildUrl}).
159163
""";
@@ -246,6 +250,9 @@ await git.Remote.CreatePullRequestAsync(new(
246250
createPullRequest = async (commitMessage, prTitle, prBody) =>
247251
{
248252
logger.LogInformation("Skipping commit and pull request creation in {Mode} mode.", options.Mode);
253+
logger.LogInformation("Commit message: {CommitMessage}", commitMessage);
254+
logger.LogInformation("Pull request title: {PullRequestTitle}", prTitle);
255+
logger.LogInformation("Pull request body:\n{PullRequestBody}", prBody);
249256
};
250257
}
251258

0 commit comments

Comments
 (0)