Fixing update dependency by using the new APIs. We broke this when we updated the version of VersionTools.

This commit is contained in:
Livar Cunha 2018-01-29 21:20:07 -08:00 committed by Livar Cunha
parent dd7664e74f
commit 978957315b
2 changed files with 8 additions and 4 deletions

View file

@ -75,7 +75,7 @@
<!-- infrastructure and test only dependencies -->
<PropertyGroup>
<VersionToolsVersion>1.0.27-prerelease-01723-01</VersionToolsVersion>
<VersionToolsVersion>2.1.0-prerelease-02430-04</VersionToolsVersion>
<DotnetDebToolVersion>2.0.0-preview2-25331-01</DotnetDebToolVersion>
<BuildTasksFeedToolVersion>2.1.0-prerelease-02221-02</BuildTasksFeedToolVersion>
</PropertyGroup>

View file

@ -4,6 +4,7 @@
using Microsoft.DotNet.VersionTools;
using Microsoft.DotNet.VersionTools.Automation;
using Microsoft.DotNet.VersionTools.Dependencies;
using Microsoft.DotNet.VersionTools.Dependencies.BuildOutput;
using System;
using System.Collections.Generic;
using System.Diagnostics;
@ -29,7 +30,7 @@ namespace Microsoft.DotNet.Scripts
IEnumerable<IDependencyUpdater> updaters = GetUpdaters();
var dependencyBuildInfos = buildInfos.Select(buildInfo =>
new DependencyBuildInfo(
new BuildDependencyInfo(
buildInfo,
upgradeStableVersions: true,
disabledPackages: Enumerable.Empty<string>()));
@ -50,11 +51,14 @@ namespace Microsoft.DotNet.Scripts
body += PullRequestCreator.NotificationString(s_config.GitHubPullRequestNotifications);
}
new PullRequestCreator(gitHubAuth, origin, upstreamBranch)
new PullRequestCreator(gitHubAuth)
.CreateOrUpdateAsync(
suggestedMessage,
suggestedMessage + $" ({upstreamBranch.Name})",
body)
body,
upstreamBranch,
origin,
new PullRequestOptions())
.Wait();
}
}