I think they should stay separate. People like the resource, not the discussion thread. Plus not every resource category has a discussion thread associated with. On my repository I have no linked discussions, just a support forum link: https://www.axivo.com/packages/elasticsearch.41/
I agree. The first post of the thread is nothing more than the resource info itself. Therefor, they should share the likes because they are the same information.
As it stands, there is no way to sort resources by likes. Unless I missed something. However, you can sort the threads by likes. But, the likes for the resource are not currently combined with the first post of the thread (which is the same thing as the resource).