refs: add repository argument to get_main_ref_store