Merge pull request #8501 from livarcocc/fix_update_dependency

Fixing update dependency by using the new APIs.
This commit is contained in:
Livar 2018-01-30 12:05:32 -08:00 committed by GitHub
commit a8a0657ce8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View file

@ -66,7 +66,7 @@
<!-- infrastructure and test only dependencies -->
<PropertyGroup>
<VersionToolsVersion>2.1.0-prerelease-02411-04</VersionToolsVersion>
<VersionToolsVersion>2.1.0-prerelease-02430-04</VersionToolsVersion>
<DotnetDebToolVersion>2.0.0-preview2-25331-01</DotnetDebToolVersion>
<BuildTasksFeedToolVersion>2.1.0-prerelease-02411-04</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();
}
}