ListReposVisible, GetRepositoryByName, and GetRepositoryByID left Repository.Owner as nil because they only selected repository columns. LEFT JOIN users in all three and populate Owner, so the API (and the web UI's repositories table) can show the owner's username.