示例#1
0
        /// <summary>
        /// Implements Package promotion in @CI, @Exploratory, @Preview, @Latest and @Stable views.
        /// </summary>
        /// <param name="m">The logger.</param>
        /// <param name="skipped">The set of packages skipped because they already exist in the feed.</param>
        /// <param name="pushed">The set of packages pushed.</param>
        /// <returns>The awaitable.</returns>
        protected override Task OnAllPackagesPushed(IActivityMonitor m, IReadOnlyList <LocalNPMPackageFile> skipped, IReadOnlyList <LocalNPMPackageFile> pushed)
        {
            string personalAccessToken = ResolveSecret(m);
            var    packages            = skipped.Concat(pushed).Select(i => i.Instance);

            return(AzureDevOpsAPIHelper.PromotePackagesAync(m, Client.HttpClient, ProjectName, Organization, FeedName, personalAccessToken, packages, true));
        }
示例#2
0
        /// <summary>
        /// Implements Package promotion in @CI, @Exploratory, @Preview, @Latest and @Stable views.
        /// </summary>
        /// <param name="logger">The logger.</param>
        /// <param name="skipped">The set of packages skipped because they already exist in the feed.</param>
        /// <param name="pushed">The set of packages pushed.</param>
        /// <returns>The awaitable.</returns>
        protected override Task OnAllPackagesPushed(NuGetLoggerAdapter logger, IReadOnlyList <LocalNuGetPackageFile> skipped, IReadOnlyList <LocalNuGetPackageFile> pushed)
        {
            string personalAccessToken = ResolveSecret(logger.Monitor);
            var    packages            = skipped.Concat(pushed).Select(i => i.Instance);

            return(AzureDevOpsAPIHelper.PromotePackagesAync(logger.Monitor, Client.HttpClient, ProjectName, Organization, FeedName, personalAccessToken, packages, false));
        }