librariesio / libraries.io

:books: The Open Source Discovery Service
https://libraries.io
GNU Affero General Public License v3.0
1.11k stars 203 forks source link

Remove the with_project_name scope from Daily Dependency Rake Task #3153

Closed mikeyoung85 closed 1 year ago

mikeyoung85 commented 1 year ago

Dependency has a validation that a project_name should exist so the scope should be a no-op for that table. RepositoryDependency doesn't have that validation, but the lookup for project ID should return a nil if a project can't be found. This also updates how project IDs are mapped for repository dependencies so that they also use Project.find_best when looking for the correct project_id.

This PR should hopefully help projects::link_dependencies to finish more consistently and bring RepositoryDependency Project ID resolution in line with the Dependency table.