Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions eng/update-dependencies/SpecificCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,17 @@ private static async Task CreateGitHubPullRequest(string commitMessage, PullRequ
if (pullRequestToUpdate == null || pullRequestToUpdate.Head.Ref != $"{upstreamBranch.Name}-{branchSuffix}")
{
Trace.WriteLine("Didn't find a PR to update. Submitting a new one.");

// Workaround for https://github.com/dotnet/dotnet-docker/issues/6427
//
// CreateOrUpdateAsync has its own internal logic to search for and update PRs, and it doesn't
// check that source branch names match. It only checks if the author matches the current user.
// If we don't force the creation of a new PR here, then we run the risk of overwriting other
// unrelated PRs. The downside is that since SearchPullRequestsAsync only returns one result, we
// may end up submitting a duplicate PR, but that's still better than overwriting an unrelated PR.
// https://github.com/dotnet/docker-tools/issues/1658 tracks migrating off of this library.
prOptions.ForceCreate = true;

await prCreator.CreateOrUpdateAsync(
commitMessage,
commitMessage,
Expand Down