It depends on the license.
For a project with BSD0 or MIT-0 that require no attribution, it is fine. Just use those licenses in your projects. (Note: Other people may repackage your code too.)
For BSD3 or MIT, that are license that require attribution, it's not clear that copilot can use the code, because they require attribution. Anyway, I think that most people that uses BSD or MIT does not care, but I'm not a lawyer.
But people that use GPL or AGPL usually cares about the "virality", i.e. all derived code MUST have the same license. I think they care a lot about using their code in a not GPL or AGPL licensed project. Many of them are angry.