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
base: main
Are you sure you want to change the base?
Allow repo with only a dotnet-tools.json file #9411
Conversation
Allow a repository to only contain a `dotnet-tools.json` file for .NET dependabot updates. Resolves dependabot#9408.
@@ -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) } |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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.