worker: change the way of fetching repos by name
Created by: sashaostrikov
Previously we were fetching repos using only repo the name which is okay for 99% cases, but the unique constraint in repo
table consists of external_service_type
, external_service_id
and external_id
columns.
This commit uses a combination of these 3 properties for fully deterministic searches without possible repo name collisions.
Test plan
Unit tests updated and should pass.
Manual tests to confirm that repo permissions are granted for projects on bitbucket.sgdev.org