Looking at the code flow, I think it would be much more clear to stick with passing in the repo_id or repo object.