-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into docker-registry
- Loading branch information
Showing
32 changed files
with
1,047 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,5 @@ | |
# frozen_string_literal: true | ||
|
||
module Dependabot | ||
VERSION = "0.282.0" | ||
VERSION = "0.283.0" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,6 @@ await RunAsync( | |
], | ||
job: new Job() | ||
{ | ||
PackageManager = "nuget", | ||
AllowedUpdates = [ | ||
new() | ||
{ | ||
|
40 changes: 40 additions & 0 deletions
40
nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Cli/Commands/CloneCommand.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using System.CommandLine; | ||
|
||
using NuGetUpdater.Core; | ||
using NuGetUpdater.Core.Clone; | ||
using NuGetUpdater.Core.Run; | ||
|
||
namespace NuGetUpdater.Cli.Commands; | ||
|
||
internal static class CloneCommand | ||
{ | ||
internal static readonly Option<FileInfo> JobPathOption = new("--job-path") { IsRequired = true }; | ||
internal static readonly Option<DirectoryInfo> RepoContentsPathOption = new("--repo-contents-path") { IsRequired = true }; | ||
internal static readonly Option<Uri> ApiUrlOption = new("--api-url") { IsRequired = true }; | ||
internal static readonly Option<string> JobIdOption = new("--job-id") { IsRequired = true }; | ||
|
||
internal static Command GetCommand(Action<int> setExitCode) | ||
{ | ||
var command = new Command("clone", "Clones a repository in preparation for a dependabot job.") | ||
{ | ||
JobPathOption, | ||
RepoContentsPathOption, | ||
ApiUrlOption, | ||
JobIdOption, | ||
}; | ||
|
||
command.TreatUnmatchedTokensAsErrors = true; | ||
|
||
command.SetHandler(async (jobPath, repoContentsPath, apiUrl, jobId) => | ||
{ | ||
var apiHandler = new HttpApiHandler(apiUrl.ToString(), jobId); | ||
var logger = new ConsoleLogger(); | ||
var gitCommandHandler = new ShellGitCommandHandler(logger); | ||
var worker = new CloneWorker(apiHandler, gitCommandHandler, logger); | ||
var exitCode = await worker.RunAsync(jobPath, repoContentsPath); | ||
setExitCode(exitCode); | ||
}, JobPathOption, RepoContentsPathOption, ApiUrlOption, JobIdOption); | ||
|
||
return command; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.