The relevant part of the terms would be
https://docs.github.com/en/site-policy/github-terms/github-t..., plus the definition of
Service, which would include Copilot. I don’t believe GitHub have ever claimed to be or suggested that they are using this, and I think it would be a
very shaky claim in a court due to the second paragraph.
Rather, GitHub have consistently cited “fair use”, as also noted in the suit, including in the summary at https://unicourt.com/case/pc-db5-doe-1-et-al-v-github-inc-et.... I also don’t believe GitHub have ever claimed to only use GitHub repositories, though I know of no obvious evidence of them having fetched from other sources, and they may well not have simply because it’s more convenient not to and they’ve got enough already, even if it honestly weakens their position (“if you’re relying on ‘fair use’, why haven’t you added closed-source software like the GitHub backend to show you mean it?”).