Skip to content

worker: change the way of fetching repos by name

Administrator requested to merge ao/get-repos-properly into main

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

Merge request reports

Loading