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.
Dependency
has a validation that aproject_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 anil
if a project can't be found. This also updates how project IDs are mapped for repository dependencies so that they also useProject.find_best
when looking for the correctproject_id
.This PR should hopefully help
projects::link_dependencies
to finish more consistently and bringRepositoryDependency
Project ID resolution in line with theDependency
table.