I think one of the interesting things that will be covered in this lawsuit is whether the licence under which the code is released applies at all in the case of screen scraping.
The current understanding of screen scraping is that it is allowed, despite what is in the websites terms. Effectively if a human can access the content freely without having to actively agree to a license or terms you can scrape the content. You can't republish verbatim, but you can data mine and perform an analysis and publish that. This is how the legal status of all AI training data scraped from the web is being interpreted.
When it comes to open source code I suspect it will be found to be similar, if the code is freely visible on the web by a human without an active agreement to view it, then it will be possible to "scrape" it. I don't think the license the code is under will apply if that is the case.
Obviously in this case is GitHub "scraping" its own site for the training data? Probably not, that may come back to bite them.
This then also opens up all sorts of interesting questions of whether you can copy paste code from a website and use it internally (not republishing), despite the license attached to the code. If it is freely visible.
Clearly a test case, this one, is needed to clarify the situation. And just because it's legal, it doesn't mean it's moral or ethical.
We may yet see the outcome of this case change the current interpolation of legal screen scraping, it's going to be an interesting time.
On top of all this there is then the question of an AI model reproducing code (or and image or music) verbatim. That obviously needs to be clarified by the courts too.