Skip to content

Commit

Permalink
Merge branch 'main' into docker-registry
Browse files Browse the repository at this point in the history
  • Loading branch information
lewis-strong authored Oct 31, 2024
2 parents 466907a + 0e1d277 commit 82ff8ca
Show file tree
Hide file tree
Showing 32 changed files with 1,047 additions and 178 deletions.
80 changes: 40 additions & 40 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
PATH
remote: bundler
specs:
dependabot-bundler (0.282.0)
dependabot-common (= 0.282.0)
dependabot-bundler (0.283.0)
dependabot-common (= 0.283.0)
parallel (~> 1.24)

PATH
remote: cargo
specs:
dependabot-cargo (0.282.0)
dependabot-common (= 0.282.0)
dependabot-cargo (0.283.0)
dependabot-common (= 0.283.0)

PATH
remote: common
specs:
dependabot-common (0.282.0)
dependabot-common (0.283.0)
aws-sdk-codecommit (~> 1.28)
aws-sdk-ecr (~> 1.5)
bundler (>= 1.16, < 3.0.0)
Expand All @@ -38,107 +38,107 @@ PATH
PATH
remote: composer
specs:
dependabot-composer (0.282.0)
dependabot-common (= 0.282.0)
dependabot-composer (0.283.0)
dependabot-common (= 0.283.0)

PATH
remote: devcontainers
specs:
dependabot-devcontainers (0.282.0)
dependabot-common (= 0.282.0)
dependabot-devcontainers (0.283.0)
dependabot-common (= 0.283.0)

PATH
remote: docker
specs:
dependabot-docker (0.282.0)
dependabot-common (= 0.282.0)
dependabot-docker (0.283.0)
dependabot-common (= 0.283.0)

PATH
remote: elm
specs:
dependabot-elm (0.282.0)
dependabot-common (= 0.282.0)
dependabot-elm (0.283.0)
dependabot-common (= 0.283.0)

PATH
remote: git_submodules
specs:
dependabot-git_submodules (0.282.0)
dependabot-common (= 0.282.0)
dependabot-git_submodules (0.283.0)
dependabot-common (= 0.283.0)
parseconfig (~> 1.0, < 1.1.0)

PATH
remote: github_actions
specs:
dependabot-github_actions (0.282.0)
dependabot-common (= 0.282.0)
dependabot-github_actions (0.283.0)
dependabot-common (= 0.283.0)

PATH
remote: go_modules
specs:
dependabot-go_modules (0.282.0)
dependabot-common (= 0.282.0)
dependabot-go_modules (0.283.0)
dependabot-common (= 0.283.0)

PATH
remote: gradle
specs:
dependabot-gradle (0.282.0)
dependabot-common (= 0.282.0)
dependabot-maven (= 0.282.0)
dependabot-gradle (0.283.0)
dependabot-common (= 0.283.0)
dependabot-maven (= 0.283.0)

PATH
remote: hex
specs:
dependabot-hex (0.282.0)
dependabot-common (= 0.282.0)
dependabot-hex (0.283.0)
dependabot-common (= 0.283.0)

PATH
remote: maven
specs:
dependabot-maven (0.282.0)
dependabot-common (= 0.282.0)
dependabot-maven (0.283.0)
dependabot-common (= 0.283.0)

PATH
remote: npm_and_yarn
specs:
dependabot-npm_and_yarn (0.282.0)
dependabot-common (= 0.282.0)
dependabot-npm_and_yarn (0.283.0)
dependabot-common (= 0.283.0)

PATH
remote: nuget
specs:
dependabot-nuget (0.282.0)
dependabot-common (= 0.282.0)
dependabot-nuget (0.283.0)
dependabot-common (= 0.283.0)
rubyzip (>= 2.3.2, < 3.0)

PATH
remote: pub
specs:
dependabot-pub (0.282.0)
dependabot-common (= 0.282.0)
dependabot-pub (0.283.0)
dependabot-common (= 0.283.0)

PATH
remote: python
specs:
dependabot-python (0.282.0)
dependabot-common (= 0.282.0)
dependabot-python (0.283.0)
dependabot-common (= 0.283.0)

PATH
remote: silent
specs:
dependabot-silent (0.282.0)
dependabot-common (= 0.282.0)
dependabot-silent (0.283.0)
dependabot-common (= 0.283.0)

PATH
remote: swift
specs:
dependabot-swift (0.282.0)
dependabot-common (= 0.282.0)
dependabot-swift (0.283.0)
dependabot-common (= 0.283.0)

PATH
remote: terraform
specs:
dependabot-terraform (0.282.0)
dependabot-common (= 0.282.0)
dependabot-terraform (0.283.0)
dependabot-common (= 0.283.0)

GEM
remote: https://rubygems.org/
Expand Down
2 changes: 1 addition & 1 deletion common/lib/dependabot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# frozen_string_literal: true

module Dependabot
VERSION = "0.282.0"
VERSION = "0.283.0"
end
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ await RunAsync(
],
job: new Job()
{
PackageManager = "nuget",
AllowedUpdates = [
new()
{
Expand Down
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;
}
}
1 change: 1 addition & 0 deletions nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Cli/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ internal static async Task<int> Main(string[] args)

var command = new RootCommand
{
CloneCommand.GetCommand(setExitCode),
FrameworkCheckCommand.GetCommand(setExitCode),
DiscoverCommand.GetCommand(setExitCode),
AnalyzeCommand.GetCommand(setExitCode),
Expand Down
Loading

0 comments on commit 82ff8ca

Please sign in to comment.