Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow repo with only a dotnet-tools.json file #9411

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

martincostello
Copy link
Contributor

Allow a repository to only contain a dotnet-tools.json file for .NET dependabot updates.

I wasn't sure where was best to put an end-to-end test for this scenario.

Resolves #9408.

Allow a repository to only contain a `dotnet-tools.json` file for .NET dependabot updates.
Resolves dependabot#9408.
@github-actions github-actions bot added the L: dotnet:nuget NuGet packages via nuget or dotnet label Apr 2, 2024
@@ -24,13 +24,14 @@ def self.required_files_in?(filenames)
return true if filenames.any? { |f| f.end_with?(".sln") }
return true if filenames.any? { |f| f.match?("^src$") }
return true if filenames.any? { |f| f.end_with?(".proj") }
return true if filenames.any? { |f| f.match?(/^dotnet\-tools\.json$/i) }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not being a ruby person, I'm not sure what the best way to refactor this to make the linter happy about the perceived complexity.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change may allow the file_fetcher to run but it doesn't change how the updater works and it currently is expecting a project file to work against.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you point me at the rough area of code I need to go and touch? I started off by searching for the error message I got in the GitHub UI.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May have to hold off for a bit as we are trying to move more of the updater logic from ruby to C# for the NuGet ecosystem. The new discover command in the NuGetUpdater.Core project is now responsible for parsing dependencies. It currently uses project files as its starting point but could be updated to simply look for global.json and .config/dotnet-tools.json in the target directory. The update command in NuGetUpdater.Core is responsible for performing the update and will be going through some changes this month.

@martincostello martincostello marked this pull request as ready for review April 2, 2024 16:10
@martincostello martincostello requested a review from a team as a code owner April 2, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: dotnet:nuget NuGet packages via nuget or dotnet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support .NET Tools updates in a repository that only contains a tools manifest
2 participants