We used the repo-level license information from github to filter to free non-copyleft licenses, and the license files are actually stored next to the extracted data corpus (see https://github.com/github/CodeSearchNet#Licenses).
It seems irresponsible for Github to continue distributing infringing code when it clearly has the tools to prevent that happening. Youtube has fingerprinting for infringing music and video. Github should be doing the same with source code.
If you're saying they are the entity in the best position to identify infringement, I would agree, but what tools does Github already have in place to do that?
By failing to do so, Github really seems to be encouraging copyright infringement.
If Github were somehow helping copyright infringers, that would be encouragement. What you're describing is additional effort on their part to actively discourage copyright infringement, which is not the same thing.
What are you talking about?