The language chosen for a repository is meta information, we don't use that to force Pygments to use a certain lexer. Most projects will have a mixture of some language code, text files, html, css, js, etc... If we forced pygments to use the primary language of the repo it would more often than not get the highlighting wrong.
The best practice for getting pygments to highlight source is to let it try to guess the lexer based on file extension and if it can not figure it out via that then you pass it the first few k of the file to let it try to guess the lexer based on the content.
I really believe this needs to be addressed as a pygments bug.