Source repo is only populated for pull requests that come from forks, so we expect this to be empty when you are creating a build for a specific commit or branch.
repo_id is available, but there is no API endpoint to get a repo via it’s ID
You should use the repository name. You cannot create a build without knowing the repository name in the first place, since the repository name is a URL parameter in the build creation endpoint.