It is, but Github's terms do not allow your code to be shared with others. Although ChatGPT represents that it does not retain information provided in conversations, it does “learn” from every conversation. There is currently little reassurance as to how those "learnings" are leveraged outside of your own usage.
Chatgpt doesn't "learn from every conversation", they trained it once and the output isn't back propagated through the network. Keep in mind that Githubs terms are the same ones they willingly ignored to make copilotm