HMD is slowly releasing source codes of its phones, and codes for Nokia 6 and Nokia 1 are already available. HMD has released the Open Source code for Nokia 8 now. This is not the full code, but just one part of it that HMD is obligated to release under the GPL or LGPL, and some other open source licenses that allow the code to be released. If you are a developer and need parts of Nokia 8’s source code, then hit this link and download it.
HMD still has to release codes for Nokia 7 plus, Nokia 8 Sirocco and maybe older phones (Nokia 6, Nokia 5, Nokia 3 and Nokia 2) if there is any need for them to do that. Anyway, this is commendable, but I think many are waiting for a bootloader to get unlocked in the near future.
Thanks everyone for the tip :).